Overview
TheNTQQMsgApi class provides methods for sending messages, retrieving message history, recalling messages, and other message-related operations.
Sending Messages
sendMsg
Send a message to a peer (user or group).Target peer object with chatType and peerUid
Array of message elements (text, image, etc.)
Timeout in milliseconds
The sent message object, or undefined if failed
forwardMsg
Forward messages from one peer to another.Source peer where messages are from
Destination peer to forward to
Array of message IDs to forward
multiForwardMsg
Forward multiple messages as a combined forward message.Source peer where messages are from
Destination peer to forward to
Array of message IDs to combine and forward
The combined forward message
Message History
getMsgHistory
Retrieve message history from a peer.Peer to get message history from
Starting message ID
Number of messages to retrieve
Whether to retrieve in reverse order
getMsgsByMsgId
Get specific messages by their IDs.Peer where messages are located
Array of message IDs to retrieve
getSingleMsg
Get a single message by sequence number.Peer where message is located
Message sequence number
getMultiMsg
Get multi-message (combined forward) content.Peer where multi-message is located
Root message ID
Parent message ID
Object containing the list of messages
Message Actions
recallMsg
Recall (delete) a sent message.Peer where message is located
Message ID to recall
setMsgRead
Mark messages as read for a peer.Peer to mark messages as read
markAllMsgAsRead
Mark all messages as read across all chats.Emoji Reactions
setEmojiLike
Add or remove an emoji reaction to a message.Peer where message is located
Message sequence number
Emoji ID to react with
true to add reaction, false to remove
getMsgEmojiLikesList
Get list of users who reacted with a specific emoji.Peer where message is located
Message sequence number
Emoji ID
Emoji type (usually ‘1’ or ‘2’)
Pagination cookie
Number of results to return
Group Files
getGroupFileList
Get list of files in a group.Group code
Parameters including startIndex and fileCount
Array of group file information
Temporary Chats
PrepareTempChat
Prepare a temporary chat session with a group member.Target user UID
Group code where user is a member
User’s nickname
getTempChatInfo
Get information about a temporary chat.Type of temporary chat
Peer UID
Utility Methods
generateMsgUniqueId
Generate a unique message ID.Chat type number
Generated unique message ID
fetchFavEmojiList
Fetch favorite emoji list.Number of emojis to fetch
sendShowInputStatusReq
Send input status (typing indicator).Target peer
Event type (e.g., typing)
