Closed carmenlau closed 5 years ago
In js sdk, user should be able to create chat with user record or id, so all of the following call should be valid.
await skygearChat.createDirectConversation(user._id, null) await skygearChat.createDirectConversation(user, null) await skygearChat.createDirectConversation(user.id, null)
Create conversation correctly
await skygearChat.createDirectConversation(user._id, null)
Got invalid user error
await skygearChat.createDirectConversation(user, null)
Always creating conversation successfully which is incorrect, should have duplicate conversation error when creating for the second time
await skygearChat.createDirectConversation(user.id, null)
To test it in js:
const user = (await skygear.publicDB.query(new skygear.Query(skygear.UserRecord).contains('username', ['user1'])))[0] await skygearChat.createDirectConversation(user, null)
Expected Results
In js sdk, user should be able to create chat with user record or id, so all of the following call should be valid.
Actual Results
Create conversation correctly
Got invalid user error
Always creating conversation successfully which is incorrect, should have duplicate conversation error when creating for the second time
Example
To test it in js: