humanbehavior-js 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -5972,6 +5972,15 @@ userData, apiKey) {
5972
5972
  error: `Failed to identify user: ${response.status} ${response.statusText} - ${errorText}`
5973
5973
  };
5974
5974
  }
5975
+ const result = yield response.json();
5976
+ // If server found existing user, return the actual userId
5977
+ if (result.actualUserId && result.actualUserId !== userId) {
5978
+ console.log(`🔄 Server found existing user: ${result.actualUserId} (sent: ${userId})`);
5979
+ return {
5980
+ success: true,
5981
+ actualUserId: result.actualUserId
5982
+ };
5983
+ }
5975
5984
  return { success: true };
5976
5985
  }
5977
5986
  catch (error) {