Search code examples
iosquickblox

Quickblox creating wrong chat dialog depending on the array order


Why if I try to create a chat dialog with the OCCUPANTIDS in ASC ORDER (1152618,1277544), results an error (is created a dialog between the FIRST ID and FIRST ID) and if I use DESC ORDER (1277544,1152618), results in success with a dialog between FIRST ID and SECOND ID?

Is this a rule or a bug?

The following code always results in this issue:

QBChatDialog *chatDialog = [QBChatDialog new];
            chatDialog.name = @"";
            chatDialog.occupantIDs = @[@(1152618),@(1277544)];
            chatDialog.type = QBChatDialogTypePrivate;

Solution

  • You don't need to add your own ID, just add the ID of the user you would like to create a dialog with.