Options
All
  • Public
  • Public/Protected
  • All
Menu

调用方式:

chatroom.chatroomMsg.sendTextMsg(options)

Hierarchy

  • ChatroomMsgServiceInterface

Index

Methods

  • 根据标签查询历史消息

    example
    const msgs = chatroom.chatroomMsg.getHistoryMsgsByTags({
    tags: ['tag1', 'tag2'],
    types: ['text', 'image', 'audio', 'video'],
    limit: 100,
    // 从较晚的消息开始查找
    reverse: 1
    })

    Parameters

    Returns Promise<ChatroomMessage[]>

  • 查询历史消息

    example
    const msgs = chatroom.chatroomMsg.queryMessageHistory({
    // 单次最多查询 100 条消息
    limit: 100,
    // 升序查询。从最早的消息开始查询
    reverse: true
    })

    Parameters

    Returns Promise<ChatroomMessage[]>

  • 发送提醒消息

    提醒消息用于会话内的状态提醒,如进入会话时出现的欢迎消息,或者会话命中敏感词后的提示消息等等.

    影响范围

    example
    chatroom.chatroomMsg.sendTipMessage({
    body: 'tip'
    })

    Parameters

    Returns Promise<ChatroomMessage>