Bugs related to unique ids (uid) in lowercase

Hello. I am testing your “pro” product and i almost gave up with it and was going to implement one of your competitors’ product because you never say that uids have to be in lowercase or that your v2.0 API automatically transform uids to lowercase.

The user ids in my database are not in lowercase and i had to use the user’s metadata field to make it compatible.

But what almost makes me give up is that if you don’t set the receiverId to lowercase when sending messages, it causes some one-on-one conversations to work without problems but other conversations don’t work well, messages from one of the users are not retrieved when fetching the conversation’s messages list. These messages are on the database because they show up on the “last message” when retrieving the conversations list, but are not retrieved when fetching the conversation’s messages list.

I still have doubts on implementing your product, i’m worried on finding other big bugs like this (e.g. there is another bug when logging out a user, you have to initialize the JS SDK again in order to login another user).

Hello @AndGo,

Regarding the issue in CometChat JS SDK, can you please let us know on which version of SDK did you face the issue ? I tried to replicate this issue but was not able to replicate it. I could login from user1 then logout and then login from user2 without calling CometChat.init after logging out from user1. I would like you to update to the latest SDK v2.0.7 and check once.

I’m using v2.0.6. I’ll check if that bug is solved on v2.0.7 as soon as i can. Thanks.

I am having the same issues around this as well. I tried to solve by feeding CometChat a lowercased UID but now am getting one of two errors

  1. Delete user: no user with uid exists
  2. Create user: The uid has already been taken

Hi @consultaredev,

The uid which you are trying to create is deactivated, which implies you won’t be able to create an user with the same uid.

There are two ways to go about your problem.

  1. Either reactivate the deleted user.(https://prodocs.cometchat.com/reference#reactivateuser)
  2. Permanently delete the user and create another user with same uid.
    for permanent deletion you have to pass a body parameter {"permanent":true} to the delete user API.
    Refer this link for more details - (https://prodocs.cometchat.com/reference#deleteuser)
    Hope this helps!

Regards,
Siva
CometChat Team

1 Like

Also is that true that UIDs are lower-cased when they come out of CometChat?

I was having an issue linking accounts earlier …

Thanks.

Hi @consultaredev,

Thanks for pointing this out.
This will be fixed in our upcoming API release.

Warm Regards,
Siva
CometChat Team

Cannot reactivate user, same for lower-cased UID

Reactivate user/Delete User:

Create user:

This seems to happen when you delete a user through the dashboard.

Hi @consultaredev,

The issue has been resolved.
Kindly let us know if you face any difficulties.
Happy to help!

Warm Regards,
Siva
CometChat Team

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.