Skip to content

Commit

Permalink
feat: additional fields for SendMessageDto
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippFr committed Nov 4, 2022
1 parent 52d2235 commit d710d58
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
28 changes: 27 additions & 1 deletion services/rocketchat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,30 @@ components:
attachments:
type: array
items:
$ref: '#/components/schemas/Attachment'
$ref: '#/components/schemas/Attachment'
file:
type: object
properties:
_id:
type: string
example: pw6oyrjBStWwMdeMv
name:
type: string
example: example.txt
type:
type: string
example: text/plain
files:
type: array
items:
type: object
properties:
_id:
type: string
example: pw6oyrjBStWwMdeMv
name:
type: string
example: example.txt
type:
type: string
example: text/plain
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private void sanitizeAndEncryptParametersAndUploadToRocketChatRoom(

log.debug("Upload Response: {}", uploadResponse);

if (doAttachmentE2e || true) {
if (doAttachmentE2e) {
// TEMP DEV TryCatch TODO: REMOVE
try {
if (rocketChatService.deleteMessage(rocketChatCredentials,
Expand All @@ -161,6 +161,8 @@ private void sanitizeAndEncryptParametersAndUploadToRocketChatRoom(
.alias(uploadResponse.getMessage().getAlias())
.org(uploadResponse.getMessage().getOrg())
.t("e2e")
.file(uploadResponse.getMessage().getFile())
.files(uploadResponse.getMessage().getFiles())
.attachments(uploadResponse.getMessage().getAttachments())
.build();
SendMessageResponseDTO postResponse = rocketChatService.sendGroupMessage(
Expand Down

0 comments on commit d710d58

Please sign in to comment.