Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different clientChannelKey when creating conversation in Android and iOS #27

Open
arturomf opened this issue Mar 10, 2021 · 4 comments
Open
Assignees

Comments

@arturomf
Copy link

Hi, i'm using this plugin in an Ionic 5 app and webhooks to update my server.

Webhook is sending this info to my server :

{
    "key":"message key",
    "from":"sender unique id",
    "groupId": 55468490,              
    "clientGroupId": "giuliana@lullaai.com_xdkcpemqpepbp8ktfmmwnuhndrl2",     
    "groupName": "Conversation",  
    "message":"message content",
    "timeStamp":1457958424000,  // Long timestamp value
    "receiverConnected": true,  // Boolean value
    "receiverLastSeenAtTime": 1457958424000 //Long timestamp value
  }

When I create a conversation using this code, I'm saving clientChannelKey in my server attached to the user that starts the conversation, so I can identify it when I receive a webhook.

kommunicate.conversationBuilder(conversationObject, (clientChannelKey) => {
     console.log("Kommunicate create conversation successful the clientChannelKey is : " + clientChannelKey);
  }, (error) =>{
      console.log("Kommunicate create conversation failed : " + error);
  });

After testing in iOS, I have noticed that clientChannelKey when creating conversation is the same clientGroupId that I get in weebhook. But in Android, clientChannelKey is the same groupId in webhook instead oif clientGroupId.

Is that a bug? or is intended?

Thanks!

@Samir1810
Copy link
Contributor

@arturomf Adding our mobile developer @reytum to take a look. We'll update you ASAP.

@reytum
Copy link
Contributor

reytum commented Mar 11, 2021

Hi, i'm using this plugin in an Ionic 5 app and webhooks to update my server.

Webhook is sending this info to my server :

{
    "key":"message key",
    "from":"sender unique id",
    "groupId": 55468490,              
    "clientGroupId": "giuliana@lullaai.com_xdkcpemqpepbp8ktfmmwnuhndrl2",     
    "groupName": "Conversation",  
    "message":"message content",
    "timeStamp":1457958424000,  // Long timestamp value
    "receiverConnected": true,  // Boolean value
    "receiverLastSeenAtTime": 1457958424000 //Long timestamp value
  }

When I create a conversation using this code, I'm saving clientChannelKey in my server attached to the user that starts the conversation, so I can identify it when I receive a webhook.

kommunicate.conversationBuilder(conversationObject, (clientChannelKey) => {
     console.log("Kommunicate create conversation successful the clientChannelKey is : " + clientChannelKey);
  }, (error) =>{
      console.log("Kommunicate create conversation failed : " + error);
  });

After testing in iOS, I have noticed that clientChannelKey when creating conversation is the same clientGroupId that I get in weebhook. But in Android, clientChannelKey is the same groupId in webhook instead oif clientGroupId.

Is that a bug? or is intended?

Thanks!

@arturomf It's Intented. It have been like that always. Android returns the channelKey and iOS return the clientChannelKey. No one pointed it out earlier has this key wasn't used for any purpose once the conversation was launched. We'll see what we can do about it.

@arturomf
Copy link
Author

arturomf commented Mar 11, 2021 via email

@reytum
Copy link
Contributor

reytum commented Mar 11, 2021

@arturomf We will fix it in the next release. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants