Class EditMessageApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.message.request.EditMessageApiRequest
- All Implemented Interfaces:
ExecutableApiRequest<List<DetachedUpload>>
public class EditMessageApiRequest
extends ZulipApiRequest
implements ExecutableApiRequest<List<DetachedUpload>>
Zulip API request builder for editing a message.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEditMessageApiRequest
(ZulipHttpClient client, long messageId) Constructs aEditMessageApiRequest
. -
Method Summary
Modifier and TypeMethodDescriptionexecute()
Executes the Zulip API request for editing a message.withContent
(String content) Sets the optional edited message content.Sets the optional propagation mode.withSendNotificationToNewThread
(boolean send) Sets the optional flag for whether to send a message to the new thread to notify users where the message came from.withSendNotificationToOldThread
(boolean send) Sets the optional flag for whether to send a message to the old thread to notify users where the message has moved to.withStreamId
(long streamId) Sets the optional id of the stream to move the message to.Sets the optional name of the topic to move the message to.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
CONTENT
- See Also:
-
PROPAGATE_MODE
- See Also:
-
SEND_NOTIFICATION_TO_OLD_THREAD
- See Also:
-
SEND_NOTIFICATION_TO_NEW_THREAD
- See Also:
-
STREAM_ID
- See Also:
-
TOPIC
- See Also:
-
-
Constructor Details
-
EditMessageApiRequest
Constructs aEditMessageApiRequest
.- Parameters:
client
- The Zulip HTTP clientmessageId
- The id of the message to edit
-
-
Method Details
-
withContent
Sets the optional edited message content.- Parameters:
content
- The modified message content- Returns:
- This
EditMessageApiRequest
instance - See Also:
-
withPropagateMode
Sets the optional propagation mode. Controls which messages(s) should be deleted.- Parameters:
mode
- The propagation mode to use- Returns:
- This
EditMessageApiRequest
instance - See Also:
-
withSendNotificationToOldThread
Sets the optional flag for whether to send a message to the old thread to notify users where the message has moved to.- Parameters:
send
-true
to send message notifications to the old thread.false
to not send any notification- Returns:
- This
EditMessageApiRequest
instance - See Also:
-
withSendNotificationToNewThread
Sets the optional flag for whether to send a message to the new thread to notify users where the message came from.- Parameters:
send
-true
to send message notifications to the new thread.false
to not send any notification- Returns:
- This
EditMessageApiRequest
instance - See Also:
-
withStreamId
Sets the optional id of the stream to move the message to.- Parameters:
streamId
- The id of the stream to which the message should be moved to- Returns:
- This
EditMessageApiRequest
instance - See Also:
-
withTopic
Sets the optional name of the topic to move the message to.- Parameters:
topic
- The name of the topic that the message should use- Returns:
- This
EditMessageApiRequest
instance - See Also:
-
execute
Executes the Zulip API request for editing a message.- Specified by:
execute
in interfaceExecutableApiRequest<List<DetachedUpload>>
- Returns:
- The response for type T
- Throws:
ZulipClientException
- if the request was not successful
-