Class MessageExtensionsKt
-
- All Implemented Interfaces:
public final class MessageExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final static MessageenrichWithCid(Message $self, String newCid)Enriches the message with the given newCid. final static MessageupdateFailedMessage(Message $self, Error error)Updates a message that whose request (Edition/Delete/Reaction update...) has failed. final static MessageupdateMessageOnlineState(Message $self, Boolean isOnline)Update the online state of a message. final static DategetCreatedAtOrThrow(Message $self)final static DategetCreatedAtOrNull(Message $self)final static DategetCreatedAtOrDefault(Message $self, Date default)-
-
Method Detail
-
enrichWithCid
final static Message enrichWithCid(Message $self, String newCid)
Enriches the message with the given newCid. Sets the Message.cid and the Message.replyTo cid to the newCid value.
-
updateFailedMessage
final static Message updateFailedMessage(Message $self, Error error)
Updates a message that whose request (Edition/Delete/Reaction update...) has failed.
- Parameters:
error- Error.
-
updateMessageOnlineState
final static Message updateMessageOnlineState(Message $self, Boolean isOnline)
Update the online state of a message.
- Parameters:
isOnline- Boolean.
-
getCreatedAtOrThrow
final static Date getCreatedAtOrThrow(Message $self)
- Returns:
when the message was created or throw an exception.
-
getCreatedAtOrNull
final static Date getCreatedAtOrNull(Message $self)
- Returns:
when the message was created or null.
-
getCreatedAtOrDefault
final static Date getCreatedAtOrDefault(Message $self, Date default)
- Returns:
when the message was created or
default.
-
-
-
-