1

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

Boban Anto
  • 31
  • 3

1 Answers1

0

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.

Suvo08 K
  • 235
  • 2
  • 6
  • This is Nikolay from QuickBlox support. This answer is correct. You may also update the SDK to the latest version: [https://github.com/QuickBlox/quickblox-react-native-sdk/releases/tag/0.5.14-beta](https://github.com/QuickBlox/quickblox-react-native-sdk/releases/tag/0.5.14-beta) – Nikolay Zolotarov Oct 21 '21 at 10:04