Home Manual Reference Source
import Message from 'webcom-reach/src/core/Message.js'
public class | source

Message

Instant Message

Static Method Summary

Static Public Methods
public static

send(room: Room, text: string): Promise<Message>

Member Summary

Public Members
public

The message sender

public

The room uid

public

The message

public

The message unique id

Method Summary

Public Methods
public

edit(newText: string): Promise<Message>

Edit the text message.

public

Remove the text message.

Static Public Methods

public static send(room: Room, text: string): Promise<Message> source

Params:

NameTypeAttributeDescription
room Room

The room to send the message to

text string

The message

Return:

Promise<Message>

Public Members

public from: string source

The message sender

public roomId: string source

The room uid

public text: string source

The message

public uid: string source

The message unique id

Public Methods

public edit(newText: string): Promise<Message> source

Edit the text message. Only the sender or moderator/owner of the room can edit a message.

Params:

NameTypeAttributeDescription
newText string

The new message

Return:

Promise<Message>

public remove(): Promise source

Remove the text message. Only the sender or moderator/owner of the room can remove a message.

Return:

Promise