Skip to content

Commit

Permalink
chore: correct alias api by adding previousId argument in the middle (
Browse files Browse the repository at this point in the history
#489)

* chore: correct `alias` api

* chore: update doc for the alias api
  • Loading branch information
1abhishekpandey authored Dec 9, 2024
1 parent 0b3759e commit 110b3c7
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -471,18 +471,17 @@ public void alias(String newId) {
}

public void alias(@NonNull String newId, @Nullable RudderOption option) {
alias(newId, option, null);
alias(newId, null, option);
}

/**
* Alias call
*
* <b>Segment compatible API</b>
*
* @param newId New userId for the user
* @param previousId Previous userId for the user
* @param option RudderOptions for this event
*/
public void alias(@NonNull String newId, @Nullable RudderOption option, @Nullable String previousId) {
public void alias(@NonNull String newId, @Nullable String previousId, @Nullable RudderOption option) {
RudderContext context = getRudderContext();
Map<String, Object> traits = null;
if (context != null) {
Expand Down

0 comments on commit 110b3c7

Please sign in to comment.