From 110b3c72125e16f62a0b3b032c62defc1280c6f2 Mon Sep 17 00:00:00 2001
From: Abhishek Pandey <64667840+1abhishekpandey@users.noreply.github.com>
Date: Mon, 9 Dec 2024 16:27:27 +0530
Subject: [PATCH] chore: correct `alias` api by adding previousId argument in
the middle (#489)
* chore: correct `alias` api
* chore: update doc for the alias api
---
.../com/rudderstack/android/sdk/core/RudderClient.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/core/src/main/java/com/rudderstack/android/sdk/core/RudderClient.java b/core/src/main/java/com/rudderstack/android/sdk/core/RudderClient.java
index 056ee063..cb525665 100644
--- a/core/src/main/java/com/rudderstack/android/sdk/core/RudderClient.java
+++ b/core/src/main/java/com/rudderstack/android/sdk/core/RudderClient.java
@@ -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
*
- * Segment compatible API
- *
* @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 traits = null;
if (context != null) {