Skip to content

Commit

Permalink
Add update message in OboMessageService (#797)
Browse files Browse the repository at this point in the history
This commit updates the OboMessageService so that a bot can update a message on behalf of someone (along with OBO message send and OBO message delete).
  • Loading branch information
antoinerollindev authored and vladokrsymphony committed Mar 25, 2024
1 parent d24990b commit 68de545
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ public List<String> getAttachmentTypes() {
* @return a {@link V4Message} object containing the details of the sent message
* @see <a href="https://developers.symphony.com/restapi/reference#update-message-v4">Create Update v4</a>
*/
@Override
@API(status = API.Status.EXPERIMENTAL)
public V4Message update(@Nonnull V4Message messageToUpdate, @Nonnull Message content) {
return this.update(messageToUpdate.getStream().getStreamId(), messageToUpdate.getMessageId(), content);
Expand All @@ -320,6 +321,7 @@ public V4Message update(@Nonnull V4Message messageToUpdate, @Nonnull Message con
* @return a {@link V4Message} object containing the details of the sent message
* @see <a href="https://developers.symphony.com/restapi/reference#update-message-v4">Create Update v4</a>
*/
@Override
@API(status = API.Status.EXPERIMENTAL)
public V4Message update(@Nonnull String streamId, @Nonnull String messageId, @Nonnull Message content) {
return this.executeAndRetry("update", messagesApi.getApiClient().getBasePath(), () -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,27 @@ public interface OboMessageService {
*/
V4Message send(@Nonnull String streamId, @Nonnull Message message);

/**
* Update an existing message. The existing message must be a valid social message, that has not been deleted.
*
* @param messageToUpdate the message to be updated
* @param content the update content (attachments are not supported yet)
* @return a {@link V4Message} object containing the details of the sent message
* @see <a href="https://developers.symphony.com/restapi/reference#update-message-v4">Create Update v4</a>
*/
V4Message update(@Nonnull V4Message messageToUpdate, @Nonnull Message content);

/**
* Update an existing message. The existing message must be a valid social message, that has not been deleted.
*
* @param streamId the ID of the stream where the message to be updated comes from
* @param messageId the ID of the message to be updated
* @param content the update content (attachments are not supported yet)
* @return a {@link V4Message} object containing the details of the sent message
* @see <a href="https://developers.symphony.com/restapi/reference#update-message-v4">Create Update v4</a>
*/
V4Message update(@Nonnull String streamId, @Nonnull String messageId, @Nonnull Message content);

/**
* Suppresses a users message based on the messageID pass in parameter.
*
Expand Down

0 comments on commit 68de545

Please sign in to comment.