quickblox react-native-sdk

251 Views Asked by At

I was trying to create a dialog using quickblox react-native-sdk. In ANDROID it worked perfectly fine, but in IOS(simulator) it is showing Error: Request failed: client error (422)

QB.chat
      .createDialog({
        type: QB.chat.DIALOG_TYPE.CHAT,
        occupantsIds: [127929951],
      })
      .then(function (dialog) {
        console.log(dialog);
        
      })
      .catch(function (e) {
        console.log(e);  
      });

Thanks in advance

1

There are 1 best solutions below

1
Suvo08 K On

Remove this line:

type: QB.chat.DIALOG_TYPE.CHAT,

Worked in my case. May be QB expects 0 as type for private chat but QB.chat.DIALOG_TYPE.CHAT in enum is type 3 which is not working in our case.