Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/strip_beeper_pmp_on_forward.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
sable: patch
---

removed forwarding of beeper's per message profile, as this might confuse clients
6 changes: 4 additions & 2 deletions src/app/components/message/modals/MessageForward.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,15 @@ export function MessageForwardInternal({
formatted_body: newBodyHtml,
}
: {};
const baseContent = { ...mEvent.getContent() };
delete baseContent['com.beeper.per_message_profile']; // remove per-message profile as that could confuse clients in the target room
let content;
// handle privacy stuff
if (isPrivate) {
// if the message is from a private room, we should strip any media or mentions to avoid leaking information to the target room
// we can still include the original message content in the body of the message, so we'll just use a fallback text/plain content with the original message body
content = {
...mEvent.getContent(),
...baseContent,
'm.relates_to': null, // remove any relations to avoid confusion in the target room
'm.mentions': null, // remove mentions to avoid leaking information about users in the original room
...forwardedTextContent,
Expand All @@ -230,7 +232,7 @@ export function MessageForwardInternal({
};
} else {
content = {
...mEvent.getContent(),
...baseContent,
...forwardedTextContent,
'm.relates_to': {
rel_type: 'm.reference',
Expand Down
Loading