Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Receive offline messages with Quickblox

Tags:

chat

quickblox

Users do not receive offline messages when they get online.

Could you please explain why users do not receive offline messages?

like image 323
user2164530 Avatar asked Nov 13 '22 09:11

user2164530


1 Answers

I used below query to fetch the previous messages.

let resPage = QBResponsePage(limit:100, skip:self.messageHandler.messageArray.count)
let parameters = ["sort_desc" : "date_sent"]
QBRequest.messagesWithDialogID(createdDialog.ID, 
                               extendedRequest: parameters, 
                               forPage: resPage, 
                               successBlock: 
                               {(response: QBResponse, messages: [QBChatMessage]?, responcePage: QBResponsePage?) in
                               /*** You will get all the previous messages ***/
                               }, 
                               errorBlock: {(response: QBResponse!) in
                               /*** Some error occured while getting messages ***/
                               })
like image 90
Manoj Avatar answered Dec 10 '22 01:12

Manoj