QuickBlox / quickblox-ios-sdk

QuickBlox iOS SDK for messaging and video calling
https://quickblox.com/developers/IOS
MIT License
397 stars 358 forks source link

I am not able to delete chat dialog. #1031

Closed riteshpatel0 closed 6 years ago

riteshpatel0 commented 6 years ago

Hello,

I am getting below error when I am try to delete chat dialog, "{     errors =     (         "You don't have appropriate permissionsError while remove dialogs. to perform this operation"     ); }"


Below my code for delete chat dialog,

QBRequest.deleteDialogs(withIDs: setDialog, forAllUsers: false, successBlock: { (response, deletedId, notFoundId, wrongPermissionId) in                 self.webServiceCall(Path.ClearChatHistory,parameter: ["user_id":_theUser.userId!]) { (json, error) in                     self.showTostMessage(json["message"].stringValue,nil)                 }             }, errorBlock: { (response) in                    print("Error while remove dialogs.")             })

ghost commented 6 years ago

Hi @riteshpatel0, could you provide full logs (Request/Response) with gist?

riteshpatel0 commented 6 years ago

Hello @pro100andrey ,

DELETE URL:https://api.quickblox.com/chat/Dialog/5af92147a28f9a1cb9250a68.json headers: {     "Accept-Language" = "en-IN;q=1";     "QB-OS" = "iOS 11.3.1";     "QB-SDK" = "iOS 2.15";     "QB-Token" = 566c76da15ee86dda14af97bd12834030201149f;     "QuickBlox-REST-API-Version" = "0.1.1";     "User-Agent" = "HelpMeOut/1.0 (iPhone; iOS 11.3.1; Scale/3.00)"; } 2018-05-17 17:47:35.036938+0530 HelpMeOut[2008:316833] [QBCore]: Response[7] headers: {     "Access-Control-Allow-Origin" = "*";     "Cache-Control" = "no-cache";     Connection = "keep-alive";     "Content-Length" = 79;     "Content-Type" = "application/json; charset=utf-8";     Date = "Thu, 17 May 2018 12:17:34 GMT";     Duration = "0.319582";     "QB-Token-ExpirationDate" = "2018-05-17 14:15:51 +0000";     "QuickBlox-REST-API-Version" = "0.1.1";     Server = "openresty/1.9.15.1";     "Set-Cookie" = "_mkra_ctxt=75b57b30b0aa3d83b92198a73e902f62--403; path=/; max-age=5; HttpOnly; secure";     Status = "403 Forbidden";     "Strict-Transport-Security" = "max-age=31536000";     "X-Content-Type-Options" = nosniff;     "X-Frame-Options" = SAMEORIGIN;     "X-Request-Id" = "e7a27aea-146e-4c0f-b29b-090bad40f09c";     "X-Runtime" = "0.017493";     "X-XSS-Protection" = "1; mode=block"; } error: Request failed: forbidden (403) reasons: {     errors =     (         "You don't have appropriate permissions to perform this operation"     ); }

ghost commented 6 years ago

Hi @riteshpatel0, Could you provide full logs from the start of the application till this issue?

Thanks

ghost commented 6 years ago

Hi @riteshpatel0, any updates?