Favourite Messages

The favourite message is a feature that allows users to mark some messages as favourites. So that they can see those important messages in the future without searching for them in chat.

Once you marked messages as favourite, you can get those from SDK to show them on your app's screen.

Add/Remove Favourites#

caution

If FavouriteMessage feature is unavailable for your plan, then it will throw 403 exception

await SDK.updateFavouriteStatus(`TO_JID`, `MESSAGE_ID`, `IS_FAVOURITE`, `MENTIONED_USERS_IDS`);

Request Param#

StatusDescriptionTypeRequired
TO_JIDJID of the To User/GroupStringtrue
MESSAGE_IDUnique Message IDStringtrue
IS_FAVOURITEtrue for adding to favourites, false for removingBooleantrue
MENTIONED_USERS_IDSArray of Group Mentioned UsersIdsArrayfalse

Get All Favourites#

caution

If FavouriteMessage feature is unavailable for your plan, then it will throw 403 exception

await SDK.getAllFavouriteMessages();

Once get all favourites method initiated, an callback method favouriteMessageListener will be triggered and response will be sent.

Remove All Favourites#

caution

If FavouriteMessage feature is unavailable for your plan, then it will throw 403 exception

await SDK.removeAllFavouriteMessages();