Package io.getstream.chat.java.models
Class Message
java.lang.Object
io.getstream.chat.java.models.Message
- Direct Known Subclasses:
Message.SearchResultMessage
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic enumstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic enumstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic enumstatic classstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a commit message requeststatic Message.MessageDeleteRequestCreates an delete requestdeleteFile(String channelType, String channelId, String url) Creates a delete file requestdeleteImage(String channelType, String channelId, String url) Creates a delete image requestCreates a flag requeststatic Message.MessageGetRequestCreates a get requestCreates a get many requestgetReplies(String parentMessageId) Creates a get replies requestpartialUpdate(String id) Creates a partial update requestpinMessage(String id, String userId) Creates a pin message request without expiration.pinMessage(String id, String userId, Date expiration) Creates a pin message request with expiration.Creates a query flag requestrunCommandAction(String messageId) Creates a run command action requestsearch()Creates a search requestCreates send requestvoidsetAdditionalField(String name, Object value) Creates a translate requestCreates an unblock message requestCreates a unflag requestunpinMessage(String id, String userId) Creates an unpin message request.Creates an update requestuploadFile(String channelType, String channelId, String userId, String contentType) Creates a file upload requestuploadImage(String channelType, String channelId, String userId, String contentType) Creates an image upload request
-
Field Details
-
fileHandlerClass
-
-
Constructor Details
-
Message
public Message()
-
-
Method Details
-
getAdditionalFields
-
setAdditionalField
-
send
@NotNull public static Message.MessageSendRequestData.MessageSendRequest send(@NotNull String channelType, @NotNull String channelId) Creates send request- Parameters:
channelType- the channel typechannelId- the channel id- Returns:
- the created request
-
get
Creates a get request- Parameters:
id- the message id- Returns:
- the created request
-
update
@NotNull public static Message.MessageUpdateRequestData.MessageUpdateRequest update(@NotNull String id) Creates an update request- Parameters:
id- the message id- Returns:
- the created request
-
delete
Creates an delete request- Parameters:
id- the message id- Returns:
- the created request
-
search
Creates a search request- Returns:
- the created request
-
uploadFile
@NotNull public static Message.MessageUploadFileRequest uploadFile(@NotNull String channelType, @NotNull String channelId, @NotNull String userId, @Nullable String contentType) Creates a file upload request- Parameters:
channelType- the channel typechannelId- the channel iduserId- the id of the user sending this filecontentType- the content type of the file to send- Returns:
- the created request
-
uploadImage
@NotNull public static Message.MessageUploadImageRequest uploadImage(@NotNull String channelType, @NotNull String channelId, @NotNull String userId, @NotNull String contentType) Creates an image upload request- Parameters:
channelType- the channel typechannelId- the channel iduserId- the id of the user sending this imagecontentType- the content type of the image to send- Returns:
- the created request
-
deleteFile
@NotNull public static Message.MessageDeleteFileRequest deleteFile(@NotNull String channelType, @NotNull String channelId, @NotNull String url) Creates a delete file request- Parameters:
channelType- the channel typechannelId- the channel idurl- the file url- Returns:
- the created request
-
deleteImage
@NotNull public static Message.MessageDeleteImageRequest deleteImage(@NotNull String channelType, @NotNull String channelId, @NotNull String url) Creates a delete image request- Parameters:
channelType- the channel typechannelId- the channel idurl- the image url- Returns:
- the created request
-
getMany
@NotNull public static Message.MessageGetManyRequest getMany(@NotNull String channelType, @NotNull String channelId, @NotNull List<String> messageIds) Creates a get many request- Parameters:
channelType- the channel typechannelId- the channel idmessageIds- the message ids- Returns:
- the created request
-
getReplies
Creates a get replies request- Parameters:
parentMessageId- the parent message id- Returns:
- the created request
-
runCommandAction
@NotNull public static Message.MessageRunCommandActionRequestData.MessageRunCommandActionRequest runCommandAction(@NotNull String messageId) Creates a run command action request- Parameters:
messageId- the message id- Returns:
- the created request
-
translate
@NotNull public static Message.MessageTranslateRequestData.MessageTranslateRequest translate(@NotNull String messageId) Creates a translate request- Parameters:
messageId- the message id- Returns:
- the created request
-
commit
@NotNull public static Message.MessageCommitRequestData.MessageCommitRequest commit(@NotNull String messageId) Creates a commit message request- Parameters:
messageId- the pending message id to commit- Returns:
- the created request
-
flag
Creates a flag request- Parameters:
messageId- the message id to flag- Returns:
- the created request
-
unflag
@NotNull public static Flag.FlagDeleteRequestData.FlagDeleteRequest unflag(@NotNull String messageId) Creates a unflag request- Parameters:
messageId- the message id to unflag- Returns:
- the created request
-
queryFlags
Creates a query flag request- Returns:
- the created request
-
partialUpdate
@NotNull public static Message.MessagePartialUpdateRequestData.MessagePartialUpdateRequest partialUpdate(@NotNull String id) Creates a partial update request- Parameters:
id- the message id- Returns:
- the created request
-
pinMessage
@NotNull public static Message.MessagePartialUpdateRequestData.MessagePartialUpdateRequest pinMessage(@NotNull String id, @NotNull String userId) Creates a pin message request without expiration. It invokes message partial update under the hood.- Parameters:
id- the message iduserId- id of the user who pins the message- Returns:
- the created request
-
pinMessage
@NotNull public static Message.MessagePartialUpdateRequestData.MessagePartialUpdateRequest pinMessage(@NotNull String id, @NotNull String userId, @NotNull Date expiration) Creates a pin message request with expiration. It invokes message partial update under the hood.- Parameters:
id- the message iduserId- id of the user who pins the messageexpiration- expiration of the pin- Returns:
- the created request
-
unpinMessage
@NotNull public static Message.MessagePartialUpdateRequestData.MessagePartialUpdateRequest unpinMessage(@NotNull String id, @NotNull String userId) Creates an unpin message request. It invokes message partial update under the hood.- Parameters:
id- the message iduserId- id of the user who unpins the message- Returns:
- the created request
-
unblock
@NotNull public static Message.MessageUnblockRequestData.MessageUnblockRequest unblock(@NotNull String messageId) Creates an unblock message request- Parameters:
messageId- the message id to unblock- Returns:
- the created request
-