Skip to content
Merged
Changes from 4 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
8 changes: 6 additions & 2 deletions src/components/views/dialogs/ForwardDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import { getKeyBindingsManager } from "../../../KeyBindingsManager";
import { KeyBindingAction } from "../../../accessibility/KeyboardShortcuts";
import { OverflowTileView } from "../rooms/OverflowTileView";
import { attachMentions } from "../rooms/SendMessageComposer";

const AVATAR_SIZE = 30;

Expand Down Expand Up @@ -178,7 +179,7 @@
);
};

const transformEvent = (event: MatrixEvent): { type: string; content: IContent } => {
const transformEvent = (event: MatrixEvent, userId: string): { type: string; content: IContent } => {
const {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
"m.relates_to": _, // strip relations - in future we will attach a relation pointing at the original event
Expand Down Expand Up @@ -212,6 +213,9 @@
},
};
}

// Force an empty m.mentions property as there is no EditorModel to parse pills from
attachMentions(userId, content, null);

Check failure on line 218 in src/components/views/dialogs/ForwardDialog.tsx

View workflow job for this annotation

GitHub Actions / Typescript Syntax Check

Expected 4-5 arguments, but got 3.

return { type, content };
};
Expand All @@ -223,7 +227,7 @@
cli.getProfileInfo(userId).then((info) => setProfileInfo(info));
}, [cli, userId]);

const { type, content } = transformEvent(event);
const { type, content } = transformEvent(event, userId);

// For the message preview we fake the sender as ourselves
const mockEvent = new MatrixEvent({
Expand Down
Loading