Skip to content
v1
文档/Browser JS SDK/消息

@beeworks/imsdk


@beeworks/imsdk / message / LocationMessage

LocationMessage ​

地理位置消息。

协议中的 address 和 name 均通过 locationBody 暴露; description 优先返回 address,为空时回退到 name。

Properties ​

Message_Type_HandshakeMessage ​

static Message_Type_HandshakeMessage: number = 0b00001101

握手消息

Inherited from ​

ChatMessage.Message_Type_HandshakeMessage


Message_Type_PingMessage ​

static Message_Type_PingMessage: number = 0b00100101

Ping消息

Inherited from ​

ChatMessage.Message_Type_PingMessage


Message_Type_PongMessage ​

static Message_Type_PongMessage: number = 0b00101001

Pong消息

Inherited from ​

ChatMessage.Message_Type_PongMessage


Message_Type_HelloMessage ​

static Message_Type_HelloMessage: number = 0b00010001

Hello消息

Inherited from ​

ChatMessage.Message_Type_HelloMessage


Message_Type_PushMessage ​

static Message_Type_PushMessage: number = 0b00110001

Push消息

Inherited from ​

ChatMessage.Message_Type_PushMessage


Message_Type_UndoMessage ​

static Message_Type_UndoMessage: number = 0b01001001

UnDo消息

Inherited from ​

ChatMessage.Message_Type_UndoMessage


Message_Type_RemoveMessage ​

static Message_Type_RemoveMessage: number = 0b01000101

Remove消息

Inherited from ​

ChatMessage.Message_Type_RemoveMessage


Message_Type_RejectMessage ​

static Message_Type_RejectMessage: number = 0b00000101

Reject 消息

Inherited from ​

ChatMessage.Message_Type_RejectMessage


Message_Type_READ ​

static Message_Type_READ: number = 0b01000001

已读消息

Inherited from ​

ChatMessage.Message_Type_READ


Message_Type_Confirm ​

static Message_Type_Confirm: number = 0b00001001

消息

Inherited from ​

ChatMessage.Message_Type_Confirm


Message_Type_GoodBy ​

static Message_Type_GoodBy: number = 0b00000001

Goodbye 连接关闭(服务端到客户端)

Inherited from ​

ChatMessage.Message_Type_GoodBy


Message_Type_Hello ​

static Message_Type_Hello: number = 0b00011001

Hello 设备握手响应

Inherited from ​

ChatMessage.Message_Type_Hello


Message_Type_Up ​

static Message_Type_Up: number = 0b00011101

Up 设备上线

Inherited from ​

ChatMessage.Message_Type_Up


Message_Type_Down ​

static Message_Type_Down: number = 0b00100001

Down 设备下线

Inherited from ​

ChatMessage.Message_Type_Down


Message_Type_Write ​

static Message_Type_Write: number = 0b00110101

Write 消息输入中

Inherited from ​

ChatMessage.Message_Type_Write


Message_Type_Check ​

static Message_Type_Check: number = 0b00111001

Check

Inherited from ​

ChatMessage.Message_Type_Check


deliveryId ​

deliveryId: string = ''

消息ID

Inherited from ​

ChatMessage.deliveryId


deliveryTime ​

deliveryTime: number

消息时间

Inherited from ​

ChatMessage.deliveryTime


deliverySeq ​

deliverySeq: number | Long = -1

消息逻辑排序号

Inherited from ​

ChatMessage.deliverySeq


fromId? ​

optional fromId: string

消息发送者ID

Inherited from ​

ChatMessage.fromId


fromDomain? ​

optional fromDomain: string

消息发送者domainId

Inherited from ​

ChatMessage.fromDomain


fromType? ​

optional fromType: ParticipantTypeFormat | CONV_C2C | CONV_C2G

消息发送者类型

Inherited from ​

ChatMessage.fromType


toId? ​

optional toId: string

消息接收者ID

Inherited from ​

ChatMessage.toId


toDomain? ​

optional toDomain: string

消息接收者domain

Inherited from ​

ChatMessage.toDomain


bodyType? ​

optional bodyType: MessageType

消息类型

Inherited from ​

ChatMessage.bodyType


atAll ​

atAll: boolean = false

是否@所有人

Inherited from ​

ChatMessage.atAll


at ​

at: IContactFormat[] = []

联系人列表

Inherited from ​

ChatMessage.at


toType? ​

optional toType: ParticipantTypeFormat | ConversationType

消息接收者类型

Inherited from ​

ChatMessage.toType


status ​

status: SenderStatus = SenderStatus.Sended

消息发送状态

Inherited from ​

ChatMessage.status


undoType ​

undoType: MessageUndoType = MessageUndoType.NONE

消息撤销类型

Inherited from ​

ChatMessage.undoType


metadata ​

metadata: MessageMetadata

消息元数据

Inherited from ​

ChatMessage.metadata


rawMetadata ​

rawMetadata: Record<string, string> = {}

服务端消息中的原始 metadata,用于保留 SDK 未建模的协议字段。

Inherited from ​

ChatMessage.rawMetadata


readStatus? ​

optional readStatus: string

已读状态

Inherited from ​

ChatMessage.readStatus


retries? ​

optional retries: number | null = 0

重发次数

Inherited from ​

ChatMessage.retries


conversationId? ​

optional conversationId: string

消息会话ID

Inherited from ​

ChatMessage.conversationId


conversationType? ​

optional conversationType: string

消息会话类型

Inherited from ​

ChatMessage.conversationType


actionId? ​

optional actionId: string

响应的消息ID

Inherited from ​

ChatMessage.actionId


actionTime? ​

optional actionTime: number

消息时间

Inherited from ​

ChatMessage.actionTime


refreshTime? ​

optional refreshTime: number

消息更新时间

Inherited from ​

ChatMessage.refreshTime


quote? ​

optional quote: any

引用消息(回复消息)

Inherited from ​

ChatMessage.quote


read? ​

optional read: number

已读人数

Inherited from ​

ChatMessage.read


readTime? ​

optional readTime: number

已读时间

Inherited from ​

ChatMessage.readTime


platforms? ​

optional platforms: any = null

支持平台

Inherited from ​

ChatMessage.platforms


MY_NAME ​

static MY_NAME: string = 'my_name'

消息体中包含的元数据的key

Inherited from ​

ChatMessage.MY_NAME

Accessors ​

description ​

Get Signature ​

get description(): string

返回地点描述;地址为空时使用地点名称。

Returns ​

string

Methods ​

updateBaseFromIMessage() ​

updateBaseFromIMessage(imessage): void

从IMessage中构建出一个消息

Parameters ​

imessage ​

IMessage

Returns ​

void

Inherited from ​

ChatMessage.updateBaseFromIMessage


setMetadata() ​

setMetadata(context, content): void

设置消息体中包含的元数据

Parameters ​

context ​

any

content ​

any

Returns ​

void

Inherited from ​

ChatMessage.setMetadata


updateBaseFromIMessageFormat() ​

updateBaseFromIMessageFormat(message): void

从IMessageFormat中构建出一个消息

Parameters ​

message ​

MessageFormat

Returns ​

void

Inherited from ​

ChatMessage.updateBaseFromIMessageFormat


updateBaseInfo() ​

updateBaseInfo(pushFormat): void

解析消息的最基本的值

Parameters ​

pushFormat ​

PushFormat

Returns ​

void

Inherited from ​

ChatMessage.updateBaseInfo


getConversationIdentifier() ​

getConversationIdentifier(): string

获取当前会话的identifier

Returns ​

string

Inherited from ​

ChatMessage.getConversationIdentifier


isUserMessage() ​

isUserMessage(): boolean

是否是单聊消息

Returns ​

boolean

Inherited from ​

ChatMessage.isUserMessage


isDiscussionMessage() ​

isDiscussionMessage(): boolean

是否是讨论组消息

Returns ​

boolean

Inherited from ​

ChatMessage.isDiscussionMessage


isSenderMessage() ​

isSenderMessage(): boolean

是否是我发送的消息

Returns ​

boolean

Inherited from ​

ChatMessage.isSenderMessage


isUndo() ​

isUndo(): boolean

消息是否已被撤回

Returns ​

boolean

Inherited from ​

ChatMessage.isUndo


locationBody() ​

locationBody(): LocationMessageBody

返回地理位置消息体。

Returns ​

LocationMessageBody