Skip to content

Commit

Permalink
added new flag require_secure_channels for messages
Browse files Browse the repository at this point in the history
  • Loading branch information
acuiuli committed Oct 3, 2023
1 parent 92f1f4a commit 204e71e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
3 changes: 2 additions & 1 deletion openapi/__tests__/definitions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ const aContentWithoutPaymentData = {
subject:
"A Subject of more than 80 characters. Try to reach this value with stupid words, and I will leave here because I like it",
markdown:
"A markdown of more than 80 characters. Try to reach this value with stupid words, and I will leave here because I like it"
"A markdown of more than 80 characters. Try to reach this value with stupid words, and I will leave here because I like it",
require_secure_channels: false
};

const aPaymentDataWithoutPayee: PaymentData = {
Expand Down
10 changes: 10 additions & 0 deletions openapi/definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ MessageContentBase:
$ref: "#/MessageSubject"
markdown:
$ref: "#/MessageBodyMarkdown"
require_secure_channels:
type: boolean
default: false
description: |-
When true, messages won't trigger email notifications (only push).
required:
- subject
- markdown
Expand Down Expand Up @@ -134,6 +139,11 @@ NewMessageContent:
$ref: "#/ThirdPartyData"
legal_data:
$ref: '#/LegalData'
require_secure_channels:
type: boolean
default: false
description: |-
When true, messages won't trigger email notifications (only push).
NewMessage:
type: object
properties:
Expand Down
3 changes: 2 additions & 1 deletion src/models/__tests__/message.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ const MESSAGE_CONTAINER_NAME = "message-content" as NonEmptyString;
const aMessageBodyMarkdown = "test".repeat(80) as MessageBodyMarkdown;
const aGeneralMessageContent = {
markdown: aMessageBodyMarkdown,
subject: "test".repeat(10) as MessageSubject
subject: "test".repeat(10) as MessageSubject,
require_secure_channels: false
};

const aMessageContent = {
Expand Down

0 comments on commit 204e71e

Please sign in to comment.