Note: I'm using @twilio/conversations version 1.1.0 in node project. I'm transitioning from using Programmable Chat to Conversations.
I'm seeing calls to Client.getConversationByUniqueName
and Client.getConversationBySid
are not returning existing channels that were created by other users.
Example:
User 'A' (with its own unique identity and token) successfully created conversation 'myConvo1'using the following code:
client.createConversation({
uniqueName: 'myConvo1',
friendlyName: 'myConvo1',
});
User 'B' (with its own unique identity and token) cannot find that conversation using: Client.getConversationByUniqueName('myConvo1')
OR Client.getConversationBySid(sid)
(just passing in the sid I get from the initial createConversation call).
I see these errors respectively:
Not Found at Upstream.actualSend
./node_modules/@twilio/conversations/node_modules/twilsock/lib/services/upstream.js:135
Conversation with SID CHc4565e40a32f4bffaf490bae2cff45db is not found.
at conversations.syncListRead.promise.then.then.conversation ./node_modules/@twilio/conversations/lib/client.js:283
However, I can access this conversation fine with the same functions if I'm using User A's token/identity. Also, when I call this from User B's Client:
client.createConversation({
uniqueName: 'myConvo1',
friendlyName: 'myConvo1',
});
I get this error: Conversation with provided unique name already exists
. So all of this leads me to believe the conversation is out there, but it's just not available for other users to join.
Note 2: I've been referencing the docs below. I don't see any explicit examples on how to find and join channels, so I may be missing something or approaching this wrong.
https://media.twiliocdn.com/sdk/js/conversations/releases/1.1.0/docs/Client.html