Display pinned messages on a banner at the top of a room (#12917)
* Move pinned message hooks to a dedicated file * Add a banner at the top of a room to display the pinned messages * Put the pinning banner behind labs pinning labs flag * Add redacted event support * Handle UTD in pinning message banner * Add tests for redaction * Make all the banner clickable * Add tests for PinnedMessageBanner.tsx * Add e2e tests for the pinned message banner * Review changes
This commit is contained in:
parent
8b2ded8a0e
commit
d16ab09866
29 changed files with 1130 additions and 180 deletions
|
@ -20,7 +20,6 @@ import { mocked, MockedObject } from "jest-mock";
|
|||
import {
|
||||
MatrixEvent,
|
||||
RoomStateEvent,
|
||||
IEvent,
|
||||
Room,
|
||||
IMinimalEvent,
|
||||
EventType,
|
||||
|
@ -266,9 +265,8 @@ describe("<PinnedMessagesCard />", () => {
|
|||
// Redacted messages are unpinnable
|
||||
const pin = mkEvent({
|
||||
event: true,
|
||||
type: EventType.RoomMessage,
|
||||
type: EventType.RoomCreate,
|
||||
content: {},
|
||||
unsigned: { redacted_because: {} as unknown as IEvent },
|
||||
room: "!room:example.org",
|
||||
user: "@alice:example.org",
|
||||
});
|
||||
|
@ -280,9 +278,8 @@ describe("<PinnedMessagesCard />", () => {
|
|||
// Redacted messages are unpinnable
|
||||
const pin = mkEvent({
|
||||
event: true,
|
||||
type: EventType.RoomMessage,
|
||||
type: EventType.RoomCreate,
|
||||
content: {},
|
||||
unsigned: { redacted_because: {} as unknown as IEvent },
|
||||
room: "!room:example.org",
|
||||
user: "@alice:example.org",
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue