sessionId
For example p2p-cs1, team-113879441
the extension field of pinned conversations.
Delete the specified conversation from the local database. and optionally delete messages for sync on the server.
Conversation ID
Whether to delete messages for sync, default value: false. Added from v8.2.0, if true, the server will not send messages for sync in this conversation next time you sign in. This setting will affect logins on other devices. Proceed with caution.
Whether the conversation is deleted by logic. The default value is false. New feature from V7.9.1, data marked as deleted but the actual data is not immediately removed from the physical storage. The unread
and msgReceiptTime
of the conversation are reserved. The next time the conversation is created, correct unread count and read timestamps are kept.
Conversation ID
Unpin a conversation The next time a user logs in, the onStickTopSessions
callback returns the list of pinned conversations during initialization. all logged-in users of the current account will get notified by the onupdatesessions
callback
sessionId
For example p2p-cs1, team-113879441
Get the session in the local database by sessionId
Query the list of conversations in the local database.
Note: The conversation list is sorted in descending order by updateTime, that is, the most recently conversations are displayed at the top.
The ID of the last conversation on the previous page, you can leave it blank for the first query.
limit on the number of queries per page, the default value is 100
Query order. The default value is false
value: false. search starts from the earliest conversations.
true: search starts from the conversations with the latest update time
Conversation ID
Get the list of pinned conversations
Insert a conversation into the local database indexdb
If the database is not enabled, a session will be inserted in the memory. It is not recommended to use this function without db. You must maintain conversation data in the memory data.
If the conversation already exists, an error will be returned
If there is a local history message for this conversation, the lastMsg of the conversation will be updated to the last message.
The onupdatesysmsgunread
callback is triggered after you insert this conversation.
Reset the unread count for all conversations.
Cancels the effect of "setCurrSession". After cancellation, the unread count will change after the conversation receives new messages.
Reset the unread count for a conversation. To reset the unread count of a superTeamSessionsUnread, use SessionInterface.resetSuperTeamSessionsUnread.
Reset the unread count for some conversations. To reset the unread count of supergroups, use SessionInterface.resetSuperTeamSessionsUnread
Reset the unread count for some supergroups
Set "join the current conversation"
Note: This is an easy-to-use composite interface . The logic is: record the current conversation in memory, call resetSessionUnread to clear the unread count when joining the conversation, and use resetSessionUnread to clear the unread count when new messages are received onMsg
.
Update conversations in the local database
Conversation ID
local custom extension field
whether to trigger onupdatesession or onupdatesessions callback, the default value is true
The earliest message in the complete message history for sync. That is, the local message history after this message is complete.
Update the pinned conversations (only the extension fields can be updated). all logged-in users of the current account will get notified by the onupdatesessions
callback
sessionId
For example p2p-cs1, team-113879441
the extension field of pinned conversations.
Pin a conversation The next time a user logs in, the
onStickTopSessions
callback returns the list of pinned conversations during initialization. all logged-in users of the current account will get notified by theonupdatesessions
callbackAssociated function