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 +9 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/server.ts +12 -1
package/dist/esm/index.js
CHANGED
|
@@ -5968,6 +5968,15 @@ userData, apiKey) {
|
|
|
5968
5968
|
error: `Failed to identify user: ${response.status} ${response.statusText} - ${errorText}`
|
|
5969
5969
|
};
|
|
5970
5970
|
}
|
|
5971
|
+
const result = yield response.json();
|
|
5972
|
+
// If server found existing user, return the actual userId
|
|
5973
|
+
if (result.actualUserId && result.actualUserId !== userId) {
|
|
5974
|
+
console.log(`🔄 Server found existing user: ${result.actualUserId} (sent: ${userId})`);
|
|
5975
|
+
return {
|
|
5976
|
+
success: true,
|
|
5977
|
+
actualUserId: result.actualUserId
|
|
5978
|
+
};
|
|
5979
|
+
}
|
|
5971
5980
|
return { success: true };
|
|
5972
5981
|
}
|
|
5973
5982
|
catch (error) {
|