-
Notifications
You must be signed in to change notification settings - Fork 2
qchat.message.QChatMessageModule
qchat/message.QChatMessageModule
-
EventEmitter
<QChatMessageEvents
>↳
QChatMessageModule
- eventNames
- listeners
- listenerCount
- emit
- on
- addListener
- once
- removeListener
- off
- removeAllListeners
- initEventHandlers
- send
- update
- revoke
- delete
- getMessages
- getMessagesCache
- getLastMessages
- markRead
- reply
- getMessageHistoryByIds
- getReferMessages
- getThreadMessages
- getThreadRootMessagesMeta
- getMentionedMeMessages
- areMentionedMeMessages
- addQuickComment
- removeQuickComment
- getQuickComments
- searchMsgByPage
▸ eventNames(): keyof QChatMessageEvents
[]
Return an array listing the events for which the emitter has registered listeners.
keyof QChatMessageEvents
[]
EventEmitter.eventNames
node_modules/eventemitter3/index.d.ts:15
▸ listeners<T
>(event
): (...args
: ArgumentMap
<QChatMessageEvents
>[Extract
<T
, keyof QChatMessageEvents
>]) => void
[]
Return the listeners registered for a given event.
Name | Type |
---|---|
T |
extends keyof QChatMessageEvents
|
Name | Type |
---|---|
event |
T |
(...args
: ArgumentMap
<QChatMessageEvents
>[Extract
<T
, keyof QChatMessageEvents
>]) => void
[]
EventEmitter.listeners
node_modules/eventemitter3/index.d.ts:20
▸ listenerCount(event
): number
Return the number of listeners listening to a given event.
Name | Type |
---|---|
event |
keyof QChatMessageEvents
|
number
EventEmitter.listenerCount
node_modules/eventemitter3/index.d.ts:27
▸ emit<T
>(event
, ...args
): boolean
Calls each of the listeners registered for a given event.
Name | Type |
---|---|
T |
extends keyof QChatMessageEvents
|
Name | Type |
---|---|
event |
T |
...args |
ArgumentMap <QChatMessageEvents >[Extract <T , keyof QChatMessageEvents >] |
boolean
EventEmitter.emit
node_modules/eventemitter3/index.d.ts:32
▸ on<T
>(event
, fn
, context?
): QChatMessageModule
Add a listener for a given event.
Name | Type |
---|---|
T |
extends keyof QChatMessageEvents
|
Name | Type |
---|---|
event |
T |
fn |
(...args : ArgumentMap <QChatMessageEvents >[Extract <T , keyof QChatMessageEvents >]) => void
|
context? |
any |
EventEmitter.on
node_modules/eventemitter3/index.d.ts:40
▸ addListener<T
>(event
, fn
, context?
): QChatMessageModule
Name | Type |
---|---|
T |
extends keyof QChatMessageEvents
|
Name | Type |
---|---|
event |
T |
fn |
(...args : ArgumentMap <QChatMessageEvents >[Extract <T , keyof QChatMessageEvents >]) => void
|
context? |
any |
EventEmitter.addListener
node_modules/eventemitter3/index.d.ts:45
▸ once<T
>(event
, fn
, context?
): QChatMessageModule
Add a one-time listener for a given event.
Name | Type |
---|---|
T |
extends keyof QChatMessageEvents
|
Name | Type |
---|---|
event |
T |
fn |
(...args : ArgumentMap <QChatMessageEvents >[Extract <T , keyof QChatMessageEvents >]) => void
|
context? |
any |
EventEmitter.once
node_modules/eventemitter3/index.d.ts:54
▸ removeListener<T
>(event
, fn?
, context?
, once?
): QChatMessageModule
Remove the listeners of a given event.
Name | Type |
---|---|
T |
extends keyof QChatMessageEvents
|
Name | Type |
---|---|
event |
T |
fn? |
(...args : ArgumentMap <QChatMessageEvents >[Extract <T , keyof QChatMessageEvents >]) => void
|
context? |
any |
once? |
boolean |
EventEmitter.removeListener
node_modules/eventemitter3/index.d.ts:63
▸ off<T
>(event
, fn?
, context?
, once?
): QChatMessageModule
Name | Type |
---|---|
T |
extends keyof QChatMessageEvents
|
Name | Type |
---|---|
event |
T |
fn? |
(...args : ArgumentMap <QChatMessageEvents >[Extract <T , keyof QChatMessageEvents >]) => void
|
context? |
any |
once? |
boolean |
EventEmitter.off
node_modules/eventemitter3/index.d.ts:69
▸ removeAllListeners(event?
): QChatMessageModule
Remove all listeners, or those of the specified event.
Name | Type |
---|---|
event? |
keyof QChatMessageEvents
|
EventEmitter.removeAllListeners
node_modules/eventemitter3/index.d.ts:79
▸ initEventHandlers(): void
注册全局回调
void
ts/qchat/message.ts:58
▸ send(param
): Promise
<QChatSendMessageResp
>
Fn
send(param: QChatSendMessageParam) 发送消息 @param[in] param 接口参数
See
QChatSendMessageParam
Name | Type |
---|---|
param |
QChatSendMessageParam |
Promise
<QChatSendMessageResp
>
void
ts/qchat/message.ts:66
▸ update(param
): Promise
<QChatUpdateMessageResp
>
Fn
update(param: QChatUpdateMessageParam) 更新消息 @param[in] param 接口参数
See
QChatUpdateMessageParam
Name | Type |
---|---|
param |
QChatUpdateMessageParam |
Promise
<QChatUpdateMessageResp
>
ts/qchat/message.ts:80
▸ revoke(param
): Promise
<QChatUpdateMessageResp
>
Fn
revoke(param: QChatRevokeMessageParam) 撤回消息,撤回未读消息不影响未读数 @param[in] param 接口参数
See
QChatRevokeMessageParam
Name | Type |
---|---|
param |
QChatRevokeMessageParam |
Promise
<QChatUpdateMessageResp
>
void
ts/qchat/message.ts:95
▸ delete(param
): Promise
<QChatUpdateMessageResp
>
Fn
delete(param: QChatDeleteMessageParam) 删除消息,删除未读消息影响未读数 @param[in] param 接口参数
See
QChatDeleteMessageParam
Name | Type |
---|---|
param |
QChatDeleteMessageParam |
Promise
<QChatUpdateMessageResp
>
void
ts/qchat/message.ts:110
▸ getMessages(param
): Promise
<QChatGetMessagesResp
>
Fn
getMessages(param: QChatGetMessagesParam) 查询历史消息 @param[in] param 接口参数
See
QChatGetMessagesParam
Name | Type |
---|---|
param |
QChatGetMessagesParam |
Promise
<QChatGetMessagesResp
>
void
ts/qchat/message.ts:125
▸ getMessagesCache(param
): Promise
<QChatGetMessagesResp
>
Fn
getMessagesCache(param: QChatGetMessagesCacheParam)
Brief
查询本地消息历史缓存, 仅用于无网络情况或加速页面显示时使用,恢复通信后应使用GetMessages的结果进行覆盖
See
QChatGetMessagesCacheParam
Name | Type | Description |
---|---|---|
param |
QChatGetMessagesCacheParam |
要查询的服务器、频道信息 |
Promise
<QChatGetMessagesResp
>
void
ts/qchat/message.ts:141
▸ getLastMessages(param
): Promise
<QChatGetLastMessagesResp
>
Fn
getLastMessages(param: QChatGetLastMessagesParam) 查询频道最后一条消息 @param[in] param 接口参数
See
QChatGetLastMessagesParam
Name | Type |
---|---|
param |
QChatGetLastMessagesParam |
Promise
<QChatGetLastMessagesResp
>
void
ts/qchat/message.ts:156
▸ markRead(param
): Promise
<QChatMarkMessageReadResp
>
Fn
markRead(param: QChatMarkMessageReadParam) 标记消息已读 @param[in] param 接口参数
See
QChatMarkMessageReadParam
Name | Type |
---|---|
param |
QChatMarkMessageReadParam |
Promise
<QChatMarkMessageReadResp
>
void
ts/qchat/message.ts:171
▸ reply(param
): Promise
<QChatSendMessageResp
>
Fn
reply(param: QChatReplyMessageParam)
Brief
回复指定消息
Since
v9.1.0 @param[in] param 接口参数
See
QChatReplyMessageParam
Name | Type |
---|---|
param |
QChatReplyMessageParam |
Promise
<QChatSendMessageResp
>
ts/qchat/message.ts:186
▸ getMessageHistoryByIds(param
): Promise
<QChatGetMessagesResp
>
Fn
getMessageHistoryByIds(param: QChatGetMessageHistoryByIdsParam)
Brief
通过一组消息 ID 查询消息详情
Since
v9.1.0
See
QChatGetMessageHistoryByIdsParam
Name | Type | Description |
---|---|---|
param |
QChatGetMessageHistoryByIdsParam |
接口参数 |
Promise
<QChatGetMessagesResp
>
ts/qchat/message.ts:201
▸ getReferMessages(param
): Promise
<QChatGetMessagesResp
>
Fn
getReferMessages(param: QChatGetReferMessagesParam)
Brief
获取指定消息的引用消息内容
Since
v9.1.0
See
QChatGetReferMessagesParam
Name | Type | Description |
---|---|---|
param |
QChatGetReferMessagesParam |
接口参数 |
Promise
<QChatGetMessagesResp
>
ts/qchat/message.ts:216
▸ getThreadMessages(param
): Promise
<QChatGetThreadMessagesResp
>
Fn
getThreadMessages(param: QChatGetThreadMessagesParam)
Brief
分页获取一个 thread 消息得详细回复消息列表
Since
v9.1.0
See
QChatGetThreadMessagesParam
Name | Type | Description |
---|---|---|
param |
QChatGetThreadMessagesParam |
接口参数 |
Promise
<QChatGetThreadMessagesResp
>
ts/qchat/message.ts:231
▸ getThreadRootMessagesMeta(param
): Promise
<QChatGetThreadRootMessagesMetaResp
>
Fn
getThreadRootMessagesMeta(param: QChatGetThreadRootMessagesMetaParam)
Brief
获取一批 thread root 消息的基本信息(回复次数,最后回复时间)
Since
v9.1.0
See
QChatGetThreadRootMessagesMetaParam
Name | Type | Description |
---|---|---|
param |
QChatGetThreadRootMessagesMetaParam |
接口参数 |
Promise
<QChatGetThreadRootMessagesMetaResp
>
ts/qchat/message.ts:246
▸ getMentionedMeMessages(param
): Promise
<QChatMessageSearchPageResp
>
Fn
getMentionedMeMessages(param: QChatGetMentionedMeMessagesParam)
Brief
查询未读消息中 @ 当前用户的消息
Since
v9.9.0
See
QChatGetMentionedMeMessagesParam
Name | Type | Description |
---|---|---|
param |
QChatGetMentionedMeMessagesParam |
接口参数 |
Promise
<QChatMessageSearchPageResp
>
ts/qchat/message.ts:261
▸ areMentionedMeMessages(param
): Promise
<QChatAreMentionedMeMessagesResp
>
Fn
areMentionedMeMessages(param: QChatAreMentionedMeMessagesParam)
Brief
查询指定消息中是否有 @ 当前用户的消息
Since
v9.9.0
See
QChatAreMentionedMeMessagesParam
Name | Type | Description |
---|---|---|
param |
QChatAreMentionedMeMessagesParam |
接口参数 |
Promise
<QChatAreMentionedMeMessagesResp
>
ts/qchat/message.ts:276
▸ addQuickComment(param
): Promise
<QChatBaseResp
>
Fn
addQuickComment(param: QChatAddQuickCommentParam)
Brief
对指定消息添加快捷评论
Since
v9.1.0
See
QChatAddQuickCommentParam
Name | Type | Description |
---|---|---|
param |
QChatAddQuickCommentParam |
接口参数 |
Promise
<QChatBaseResp
>
ts/qchat/message.ts:291
▸ removeQuickComment(param
): Promise
<QChatBaseResp
>
Fn
removeQuickComment(param: QChatRemoveQuickCommentParam)
Brief
从某个消息上移除快捷评论
Since
v9.1.0
See
QChatRemoveQuickComm entParam
Name | Type | Description |
---|---|---|
param |
QChatRemoveQuickCommentParam |
接口参数 |
Promise
<QChatBaseResp
>
ts/qchat/message.ts:306
▸ getQuickComments(param
): Promise
<QChatGetQuickCommentsResp
>
Fn
getQuickComments(param: QChatGetQuickCommentsParam)
Brief
获取指定消息包含的快捷评论列表
Since
v9.1.0
See
QChatGetQuickCommentsParam
Name | Type | Description |
---|---|---|
param |
QChatGetQuickCommentsParam |
接口参数 |
Promise
<QChatGetQuickCommentsResp
>
ts/qchat/message.ts:321
▸ searchMsgByPage(param
): Promise
<QChatMessageSearchPageResp
>
Fn
searchMsgByPage(param: QChatMessageSearchPageParam)
Brief
分页搜索消息
Since
v9.4.0
See
QChatSearchMsgByPageParam
Name | Type | Description |
---|---|---|
param |
QChatMessageSearchPageParam |
接口参数 |
Promise
<QChatMessageSearchPageResp
>
ts/qchat/message.ts:336
• instance: any
ts/qchat/message.ts:52
• new QChatMessageModule()
EventEmitter<QChatMessageEvents>.constructor
ts/qchat/message.ts:53
- chatroom/chatroom
- chatroom_def/chatroom_def
- nim/client
- nim/data_sync
- nim/friend
- nim/global
- nim/msglog
- nim/nos
- nim/online_session
- nim/pass_through_proxy
- nim/plugin
- nim/session
- nim/subscribe_event
- nim/super_team
- nim/sysmsg
- nim/talk
- nim/talkex
- nim/team
- nim/tool
- nim/user
- nim_def/client_def
- nim_def/data_sync_def
- nim_def/doc_trans_def
- nim_def/friend_def
- nim_def/global_def
- nim_def/msglog_def
- nim_def/nos_def
- nim_def/online_session_def
- nim_def/pass_through_proxy_def
- nim_def/plugin_def
- nim_def/session_def
- nim_def/subscribe_event_def
- nim_def/super_team_def
- nim_def/sysmsg_def
- nim_def/talk_def
- nim_def/talkex_def
- nim_def/team_def
- nim_def/tool_def
- nim_def/user_def
- node-nim
- qchat/attachment
- qchat/channel
- qchat/channel_category
- qchat/instance
- qchat/message
- qchat/role
- qchat/server
- qchat/system_notification
- qchat_def/attachment_def
- qchat_def/channel_def
- qchat_def/instance_def
- qchat_def/message_def
- qchat_def/public_def
- qchat_def/role_def
- qchat_def/server_def
- qchat_def/system_notification_def