Views: 2206
Last Modified: 08.02.2022
Set chat or conversation as "unread" |
Revision
Get current information about current API revision (platform version) – im.revision.get
: 30 |
Parameters
Parameter |
Example |
Required |
Description |
Revision |
DIALOG_ID |
'chat74' |
Yes |
Dialog ID. Format:
- chatXXX – recipient chat, when message is sent to chat
or
- XXX – recipient ID, when message is sent to private conversation
|
30 |
ACTION |
'Y' |
No |
Mark|unmark the dialog as «unread» - 'Y'|'N' |
30 |
|
Called method and response
JavaScript
B24.callMethod(
'im.recent.unread',
{
DIALOG_ID: 'chat74',
ACTION: 'Y'
},
res => {
if (res.error())
{
console.error(result.error().ex);
}
else
{
console.log(res.data())
}
}
)
Response example
true //when mark|unmark is successful
Example of response on error
{
"error":"DIALOG_ID_EMPTY",
"error_description":"Dialog ID can\u0027t be empty"
}
Key description:
error
– error code
error_description
– error brief description
Possible error codes
Code |
Description |
DIALOG_ID_EMPTY |
DIALOG_ID parameter not passed or doesn't correspond to format |
|