unable to update dialog.data Quickblox[iOS]

274 views Asked by At

I need to store custom parameters in a chat dialog but it dialog fails to update with the new parameters. In both the print statements, the one under under Chat Dialog and updated Dialog; the data field in the still (null). I have followed the steps from the Quickblox website but this still fails. Am I missing something here?

 chatDialog?.data = ["UserID" : "2342342342134231412342" ]
 print("Chat dialog")
 print(chatDialog)
 QBRequest.update(chatDialog!, successBlock: { (response, updatedDialog) in

     guard updatedDialog != nil else {
         return
     }

     print("updated dialog")
     print(updatedDialog!)
     completion(response, updatedDialog)
 })
1

There are 1 answers

0
An Kit On

Please read below link for custom parameters in chat dialog.

http://quickblox.com/developers/Custom_Objects#Create_data_schema

dialog.data = ["class_name": "dialog_data", "age": 33];