Skip to content

qchat.message.QChatMessageModule

Zvicii edited this page Feb 10, 2023 · 6 revisions

Class: QChatMessageModule

qchat/message.QChatMessageModule

Hierarchy

Table of contents

Methods

Properties

Constructors

Methods

eventNames

eventNames(): keyof QChatMessageEvents[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof QChatMessageEvents[]

Inherited from

EventEmitter.eventNames

Defined in

node_modules/eventemitter3/index.d.ts:15


listeners

listeners<T>(event): (...args: ArgumentMap<QChatMessageEvents>[Extract<T, keyof QChatMessageEvents>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof QChatMessageEvents

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<QChatMessageEvents>[Extract<T, keyof QChatMessageEvents>]) => void[]

Inherited from

EventEmitter.listeners

Defined in

node_modules/eventemitter3/index.d.ts:20


listenerCount

listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof QChatMessageEvents

Returns

number

Inherited from

EventEmitter.listenerCount

Defined in

node_modules/eventemitter3/index.d.ts:27


emit

emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends keyof QChatMessageEvents

Parameters

Name Type
event T
...args ArgumentMap<QChatMessageEvents>[Extract<T, keyof QChatMessageEvents>]

Returns

boolean

Inherited from

EventEmitter.emit

Defined in

node_modules/eventemitter3/index.d.ts:32


on

on<T>(event, fn, context?): QChatMessageModule

Add a listener for a given event.

Type parameters

Name Type
T extends keyof QChatMessageEvents

Parameters

Name Type
event T
fn (...args: ArgumentMap<QChatMessageEvents>[Extract<T, keyof QChatMessageEvents>]) => void
context? any

Returns

QChatMessageModule

Inherited from

EventEmitter.on

Defined in

node_modules/eventemitter3/index.d.ts:40


addListener

addListener<T>(event, fn, context?): QChatMessageModule

Type parameters

Name Type
T extends keyof QChatMessageEvents

Parameters

Name Type
event T
fn (...args: ArgumentMap<QChatMessageEvents>[Extract<T, keyof QChatMessageEvents>]) => void
context? any

Returns

QChatMessageModule

Inherited from

EventEmitter.addListener

Defined in

node_modules/eventemitter3/index.d.ts:45


once

once<T>(event, fn, context?): QChatMessageModule

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof QChatMessageEvents

Parameters

Name Type
event T
fn (...args: ArgumentMap<QChatMessageEvents>[Extract<T, keyof QChatMessageEvents>]) => void
context? any

Returns

QChatMessageModule

Inherited from

EventEmitter.once

Defined in

node_modules/eventemitter3/index.d.ts:54


removeListener

removeListener<T>(event, fn?, context?, once?): QChatMessageModule

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof QChatMessageEvents

Parameters

Name Type
event T
fn? (...args: ArgumentMap<QChatMessageEvents>[Extract<T, keyof QChatMessageEvents>]) => void
context? any
once? boolean

Returns

QChatMessageModule

Inherited from

EventEmitter.removeListener

Defined in

node_modules/eventemitter3/index.d.ts:63


off

off<T>(event, fn?, context?, once?): QChatMessageModule

Type parameters

Name Type
T extends keyof QChatMessageEvents

Parameters

Name Type
event T
fn? (...args: ArgumentMap<QChatMessageEvents>[Extract<T, keyof QChatMessageEvents>]) => void
context? any
once? boolean

Returns

QChatMessageModule

Inherited from

EventEmitter.off

Defined in

node_modules/eventemitter3/index.d.ts:69


removeAllListeners

removeAllListeners(event?): QChatMessageModule

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof QChatMessageEvents

Returns

QChatMessageModule

Inherited from

EventEmitter.removeAllListeners

Defined in

node_modules/eventemitter3/index.d.ts:79


initEventHandlers

initEventHandlers(): void

注册全局回调

Returns

void

Defined in

ts/qchat/message.ts:58


send

send(param): Promise<QChatSendMessageResp>

Fn

send(param: QChatSendMessageParam) 发送消息 @param[in] param 接口参数

See

QChatSendMessageParam

Parameters

Name Type
param QChatSendMessageParam

Returns

Promise<QChatSendMessageResp>

void

Defined in

ts/qchat/message.ts:66


update

update(param): Promise<QChatUpdateMessageResp>

Fn

update(param: QChatUpdateMessageParam) 更新消息 @param[in] param 接口参数

See

QChatUpdateMessageParam

Parameters

Name Type
param QChatUpdateMessageParam

Returns

Promise<QChatUpdateMessageResp>

Defined in

ts/qchat/message.ts:80


revoke

revoke(param): Promise<QChatUpdateMessageResp>

Fn

revoke(param: QChatRevokeMessageParam) 撤回消息,撤回未读消息不影响未读数 @param[in] param 接口参数

See

QChatRevokeMessageParam

Parameters

Name Type
param QChatRevokeMessageParam

Returns

Promise<QChatUpdateMessageResp>

void

Defined in

ts/qchat/message.ts:95


delete

delete(param): Promise<QChatUpdateMessageResp>

Fn

delete(param: QChatDeleteMessageParam) 删除消息,删除未读消息影响未读数 @param[in] param 接口参数

See

QChatDeleteMessageParam

Parameters

Name Type
param QChatDeleteMessageParam

Returns

Promise<QChatUpdateMessageResp>

void

Defined in

ts/qchat/message.ts:110


getMessages

getMessages(param): Promise<QChatGetMessagesResp>

Fn

getMessages(param: QChatGetMessagesParam) 查询历史消息 @param[in] param 接口参数

See

QChatGetMessagesParam

Parameters

Name Type
param QChatGetMessagesParam

Returns

Promise<QChatGetMessagesResp>

void

Defined in

ts/qchat/message.ts:125


getMessagesCache

getMessagesCache(param): Promise<QChatGetMessagesResp>

Fn

getMessagesCache(param: QChatGetMessagesCacheParam)

Brief

查询本地消息历史缓存, 仅用于无网络情况或加速页面显示时使用,恢复通信后应使用GetMessages的结果进行覆盖

See

QChatGetMessagesCacheParam

Parameters

Name Type Description
param QChatGetMessagesCacheParam 要查询的服务器、频道信息

Returns

Promise<QChatGetMessagesResp>

void

Defined in

ts/qchat/message.ts:141


getLastMessages

getLastMessages(param): Promise<QChatGetLastMessagesResp>

Fn

getLastMessages(param: QChatGetLastMessagesParam) 查询频道最后一条消息 @param[in] param 接口参数

See

QChatGetLastMessagesParam

Parameters

Name Type
param QChatGetLastMessagesParam

Returns

Promise<QChatGetLastMessagesResp>

void

Defined in

ts/qchat/message.ts:156


markRead

markRead(param): Promise<QChatMarkMessageReadResp>

Fn

markRead(param: QChatMarkMessageReadParam) 标记消息已读 @param[in] param 接口参数

See

QChatMarkMessageReadParam

Parameters

Name Type
param QChatMarkMessageReadParam

Returns

Promise<QChatMarkMessageReadResp>

void

Defined in

ts/qchat/message.ts:171


reply

reply(param): Promise<QChatSendMessageResp>

Fn

reply(param: QChatReplyMessageParam)

Brief

回复指定消息

Since

v9.1.0 @param[in] param 接口参数

See

QChatReplyMessageParam

Parameters

Name Type
param QChatReplyMessageParam

Returns

Promise<QChatSendMessageResp>

Defined in

ts/qchat/message.ts:186


getMessageHistoryByIds

getMessageHistoryByIds(param): Promise<QChatGetMessagesResp>

Fn

getMessageHistoryByIds(param: QChatGetMessageHistoryByIdsParam)

Brief

通过一组消息 ID 查询消息详情

Since

v9.1.0

See

QChatGetMessageHistoryByIdsParam

Parameters

Name Type Description
param QChatGetMessageHistoryByIdsParam 接口参数

Returns

Promise<QChatGetMessagesResp>

Defined in

ts/qchat/message.ts:201


getReferMessages

getReferMessages(param): Promise<QChatGetMessagesResp>

Fn

getReferMessages(param: QChatGetReferMessagesParam)

Brief

获取指定消息的引用消息内容

Since

v9.1.0

See

QChatGetReferMessagesParam

Parameters

Name Type Description
param QChatGetReferMessagesParam 接口参数

Returns

Promise<QChatGetMessagesResp>

Defined in

ts/qchat/message.ts:216


getThreadMessages

getThreadMessages(param): Promise<QChatGetThreadMessagesResp>

Fn

getThreadMessages(param: QChatGetThreadMessagesParam)

Brief

分页获取一个 thread 消息得详细回复消息列表

Since

v9.1.0

See

QChatGetThreadMessagesParam

Parameters

Name Type Description
param QChatGetThreadMessagesParam 接口参数

Returns

Promise<QChatGetThreadMessagesResp>

Defined in

ts/qchat/message.ts:231


getThreadRootMessagesMeta

getThreadRootMessagesMeta(param): Promise<QChatGetThreadRootMessagesMetaResp>

Fn

getThreadRootMessagesMeta(param: QChatGetThreadRootMessagesMetaParam)

Brief

获取一批 thread root 消息的基本信息(回复次数,最后回复时间)

Since

v9.1.0

See

QChatGetThreadRootMessagesMetaParam

Parameters

Name Type Description
param QChatGetThreadRootMessagesMetaParam 接口参数

Returns

Promise<QChatGetThreadRootMessagesMetaResp>

Defined in

ts/qchat/message.ts:246


getMentionedMeMessages

getMentionedMeMessages(param): Promise<QChatMessageSearchPageResp>

Fn

getMentionedMeMessages(param: QChatGetMentionedMeMessagesParam)

Brief

查询未读消息中 @ 当前用户的消息

Since

v9.9.0

See

QChatGetMentionedMeMessagesParam

Parameters

Name Type Description
param QChatGetMentionedMeMessagesParam 接口参数

Returns

Promise<QChatMessageSearchPageResp>

Defined in

ts/qchat/message.ts:261


areMentionedMeMessages

areMentionedMeMessages(param): Promise<QChatAreMentionedMeMessagesResp>

Fn

areMentionedMeMessages(param: QChatAreMentionedMeMessagesParam)

Brief

查询指定消息中是否有 @ 当前用户的消息

Since

v9.9.0

See

QChatAreMentionedMeMessagesParam

Parameters

Name Type Description
param QChatAreMentionedMeMessagesParam 接口参数

Returns

Promise<QChatAreMentionedMeMessagesResp>

Defined in

ts/qchat/message.ts:276


addQuickComment

addQuickComment(param): Promise<QChatBaseResp>

Fn

addQuickComment(param: QChatAddQuickCommentParam)

Brief

对指定消息添加快捷评论

Since

v9.1.0

See

QChatAddQuickCommentParam

Parameters

Name Type Description
param QChatAddQuickCommentParam 接口参数

Returns

Promise<QChatBaseResp>

Defined in

ts/qchat/message.ts:291


removeQuickComment

removeQuickComment(param): Promise<QChatBaseResp>

Fn

removeQuickComment(param: QChatRemoveQuickCommentParam)

Brief

从某个消息上移除快捷评论

Since

v9.1.0

See

QChatRemoveQuickComm entParam

Parameters

Name Type Description
param QChatRemoveQuickCommentParam 接口参数

Returns

Promise<QChatBaseResp>

Defined in

ts/qchat/message.ts:306


getQuickComments

getQuickComments(param): Promise<QChatGetQuickCommentsResp>

Fn

getQuickComments(param: QChatGetQuickCommentsParam)

Brief

获取指定消息包含的快捷评论列表

Since

v9.1.0

See

QChatGetQuickCommentsParam

Parameters

Name Type Description
param QChatGetQuickCommentsParam 接口参数

Returns

Promise<QChatGetQuickCommentsResp>

Defined in

ts/qchat/message.ts:321


searchMsgByPage

searchMsgByPage(param): Promise<QChatMessageSearchPageResp>

Fn

searchMsgByPage(param: QChatMessageSearchPageParam)

Brief

分页搜索消息

Since

v9.4.0

See

QChatSearchMsgByPageParam

Parameters

Name Type Description
param QChatMessageSearchPageParam 接口参数

Returns

Promise<QChatMessageSearchPageResp>

Defined in

ts/qchat/message.ts:336

Properties

instance

instance: any

Defined in

ts/qchat/message.ts:52

Constructors

constructor

new QChatMessageModule()

Overrides

EventEmitter<QChatMessageEvents&gt;.constructor

Defined in

ts/qchat/message.ts:53

Clone this wiki locally