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

"createGroup" method creates duplicate group on invoke (Javascript) #73

Closed
vyonizr opened this issue Sep 29, 2021 · 5 comments
Closed

Comments

@vyonizr
Copy link

vyonizr commented Sep 29, 2021

Platform: Javascript
Build date: Sep 26, 2021 12:31 GMT

I implement createGroup method as documented on https://mesibo.com/documentation/api/real-time-api/groups/ .

My code snippet:

 MesiboApi.createGroup(groupName.msg, 0, function (createdGroup) {
    const groupPermissions = {
      flags: 0xFFFF,
      adminFlags: 0,
      callFlags: 2 | 4 | 0x8000 | 0x10000 | 0x20000,
      videoResolution: 2
    };

    createdGroup.addMembers(selectedUsers, groupPermissions)
    if (groupPicture.url) {
      createdGroup.setImageUrl(groupPicture.url)
    }
  });
}

For example, I created a group called "ExampleGroup". On the console, GroupListener listener only prints once with group ID 124027:
image

But when I checked on Mesibo console, there are two groups with the same name with neighboring ID (124028 and 124027) but very distant Expiry Date. 124028 expires on Oct 17, 2021 07:18 PM while 124027 expires on Sep 28, 2024 01:18 PM as shown below.

image

On the other hand, when I called getSortedProfiles, only one "ExampleGroup" with group ID 124027 appeared. I could not find group ID 124028.

image

What do I need to do? And please let me know if you need more information. Thank you.

@mesibo
Copy link
Owner

mesibo commented Sep 29, 2021

You can give any name to the group, even the same name. The group ID will be different.

It is like two different users of your app have created groups name "Family".

Regarding group 124028, it was created by you using backend API from IP address "120.29.23x.xx2" and hence you have two groups.

@mesibo mesibo closed this as completed Sep 29, 2021
@vyonizr
Copy link
Author

vyonizr commented Sep 29, 2021

You can give any name to the group, even the same name. The group ID will be different.

It is like two different users of your app have created groups name "Family".

The problem is it is "accidentally" created twice when createGroup method is invoked and one of them is not found using getSortedProfiles method.

@mesibo
Copy link
Owner

mesibo commented Sep 29, 2021

It is because it does not have members. getSortedProfiles will only return if the user is a member of that group. Also, we are discouraging that method now. Please use createGroup

@vyonizr
Copy link
Author

vyonizr commented Sep 29, 2021

Is it possible to see whether 124028 and 124027 were created by the same user? And how do they have very distant Expiry Date while created almost at the same time?

@mesibo
Copy link
Owner

mesibo commented Sep 29, 2021

124028 was created by backend API - you have passed expiry here - please check your code before posting queries. Below is the parameter you have passed.

op - groupadd , flag - 0 , name - Example Group , expiry - 31536000 , expiryext - 31536000 , active - 1 , token - ,

124027 was created by some user, you must know which user.

I am closing this.

Repository owner locked and limited conversation to collaborators Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants