ReadReceiptInfo class
General information about a read receipt.
Constructors
Read |
Initializes a new instance of the ReadReceiptInfo class. |
Properties
last |
The id of the last read message. |
Methods
is |
Helper method useful for determining if a message has been read. If the compareMessageId is less than or equal to the lastReadMessageId, then the message has been read. |
is |
Helper method useful for determining if a message has been read. This method converts the strings to numbers. If the compareMessageId is less than or equal to the lastReadMessageId, then the message has been read. |
Constructor Details
ReadReceiptInfo(string)
Initializes a new instance of the ReadReceiptInfo class.
new ReadReceiptInfo(lastReadMessageId?: string)
Parameters
- lastReadMessageId
-
string
Optional. The id of the last read message.
Property Details
lastReadMessageId
The id of the last read message.
lastReadMessageId: string
Property Value
string
Method Details
isMessageRead(string)
Helper method useful for determining if a message has been read. If the compareMessageId is less than or equal to the lastReadMessageId, then the message has been read.
function isMessageRead(compareMessageId: string): boolean
Parameters
- compareMessageId
-
string
The id of the message to compare.
Returns
boolean
True if the compareMessageId is less than or equal to the lastReadMessageId.
isMessageRead(string, string)
Helper method useful for determining if a message has been read. This method converts the strings to numbers. If the compareMessageId is less than or equal to the lastReadMessageId, then the message has been read.
static function isMessageRead(compareMessageId: string, lastReadMessageId: string): boolean
Parameters
- compareMessageId
-
string
The id of the message to compare.
- lastReadMessageId
-
string
The id of the last message read by the user.
Returns
boolean
True if the compareMessageId is less than or equal to the lastReadMessageId.