Skip to content

Commit ba94d54

Browse files
Add update message in OboMessageService (#797)
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).
1 parent 4b6f66a commit ba94d54

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

symphony-bdk-core/src/main/java/com/symphony/bdk/core/service/message/MessageService.java

+2
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ public List<String> getAttachmentTypes() {
306306
* @return a {@link V4Message} object containing the details of the sent message
307307
* @see <a href="https://developers.symphony.com/restapi/reference#update-message-v4">Create Update v4</a>
308308
*/
309+
@Override
309310
@API(status = API.Status.EXPERIMENTAL)
310311
public V4Message update(@Nonnull V4Message messageToUpdate, @Nonnull Message content) {
311312
return this.update(messageToUpdate.getStream().getStreamId(), messageToUpdate.getMessageId(), content);
@@ -320,6 +321,7 @@ public V4Message update(@Nonnull V4Message messageToUpdate, @Nonnull Message con
320321
* @return a {@link V4Message} object containing the details of the sent message
321322
* @see <a href="https://developers.symphony.com/restapi/reference#update-message-v4">Create Update v4</a>
322323
*/
324+
@Override
323325
@API(status = API.Status.EXPERIMENTAL)
324326
public V4Message update(@Nonnull String streamId, @Nonnull String messageId, @Nonnull Message content) {
325327
return this.executeAndRetry("update", messagesApi.getApiClient().getBasePath(), () -> {

symphony-bdk-core/src/main/java/com/symphony/bdk/core/service/message/OboMessageService.java

+21
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,27 @@ public interface OboMessageService {
6868
*/
6969
V4Message send(@Nonnull String streamId, @Nonnull Message message);
7070

71+
/**
72+
* Update an existing message. The existing message must be a valid social message, that has not been deleted.
73+
*
74+
* @param messageToUpdate the message to be updated
75+
* @param content the update content (attachments are not supported yet)
76+
* @return a {@link V4Message} object containing the details of the sent message
77+
* @see <a href="https://developers.symphony.com/restapi/reference#update-message-v4">Create Update v4</a>
78+
*/
79+
V4Message update(@Nonnull V4Message messageToUpdate, @Nonnull Message content);
80+
81+
/**
82+
* Update an existing message. The existing message must be a valid social message, that has not been deleted.
83+
*
84+
* @param streamId the ID of the stream where the message to be updated comes from
85+
* @param messageId the ID of the message to be updated
86+
* @param content the update content (attachments are not supported yet)
87+
* @return a {@link V4Message} object containing the details of the sent message
88+
* @see <a href="https://developers.symphony.com/restapi/reference#update-message-v4">Create Update v4</a>
89+
*/
90+
V4Message update(@Nonnull String streamId, @Nonnull String messageId, @Nonnull Message content);
91+
7192
/**
7293
* Suppresses a users message based on the messageID pass in parameter.
7394
*

0 commit comments

Comments
 (0)