Skip to content

Conversation

@yosriady
Copy link
Contributor

Identify can no longer autodetect addresses, only an explicit connect event can get it now.

This PR simplifies the identify function

@linear
Copy link

linear bot commented Apr 22, 2025

P-1198 Empty address for identify calls

We stopped getting addresses in identify calls since the last SDK release

Screenshot 2025-04-22 at 16.39.11.png

@yosriady yosriady changed the base branch from main to sdk/2.0-spec April 22, 2025 10:23
@yosriady yosriady marked this pull request as ready for review April 22, 2025 10:24
providerName?: string;
userId?: string;
rdns?: string;
}): Promise<void>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

properties?: IFormoEventProperties,
context?: IFormoEventContext,
callback?: (...args: unknown[]) => void

why r u removing these ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mistake, let me add it back

};

// TODO: enable this
// this.currentAddress = address;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an address is set by a previous identify or connect event, all subsequent events should have it


// TODO: enable this
// this.currentAddress = address;
// if (userId) this.userId = userId || null;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a userId is set by a previous identify or connect event, all subsequent events should have it

@yosriady yosriady merged commit d6efa67 into sdk/2.0-spec Apr 22, 2025
1 check passed
@yosriady yosriady deleted the p-1198 branch April 22, 2025 10:59
TamHuynhTee added a commit that referenced this pull request Apr 23, 2025
* Update SDK to follow 2.0 event spec

* Refactor

* Refactor

* Refactor

* Add Track event type

* refactor with switch case

* Remove comment, refactor

* Add version generator, rename event type, change event endpoint

* Refactor Event Factory, receive additional properties, context, callback as parameters

* Fix identify (#61)

* Fix identify

* Fix merge

* Fix interface

* Define generateMessageId helper function

* Rename timestamp to originalTimestamp

* Add sent_at

* Generate sent_at once for the entire batch

* Update EVENTS_API_URL

* Add user id tracking property, pass user id and address as optional parameters if they're set

---------

Co-authored-by: Huỳnh Thanh Tâm <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants