Hitesh Prajapati
Hitesh Prajapati

Reputation: 50

Update Twilio chat message body and attribute and get read/unread message counter using iOS sdk

1) How we can update Twilio chat message body and attribute using iOS sdk? We need to edit message attributes after message sent so is this possible to edit message body by iOS sdk. I found update message body thind api doc for php but not for iOS so please help to do this.

2) How we can get Messages counter for read and unread messages for a User or channel?

Upvotes: 1

Views: 1667

Answers (1)

philnash
philnash

Reputation: 73065

Twilio developer evangelist here.

  1. In the iOS SDK you can update a message body using updateBody:completion and you can update message attributes with setAttributes:completion.

  2. To get the number of unread messages for a channel you can use getUnconsumedMessagesCountWithCompletion and for the total messages in a channel you can use getMessagesCountWithCompletion.

Let me know if that helps at all.

Upvotes: 1

Related Questions