Skip to content

Commit

Permalink
trim surrounding whitespace when sending messages
Browse files Browse the repository at this point in the history
  • Loading branch information
twrichards committed Oct 20, 2023
1 parent 320e351 commit a7f5025
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/editItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const EditItem = ({ item, cancel }: EditItemProps) => {
variables: {
itemId: item.id,
input: {
message: message || null,
message: message?.trim() || null,
payload,
type,
},
Expand Down
2 changes: 1 addition & 1 deletion client/src/sendMessageArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export const SendMessageArea = ({
variables: {
input: {
type: payloadToBeSent?.type || "message-only",
message,
message: message?.trim(),
payload:
payloadToBeSent && JSON.stringify(payloadToBeSent.payload),
pinboardId,
Expand Down

0 comments on commit a7f5025

Please sign in to comment.