Show poll question in message preview (#7320)
This commit is contained in:
parent
914b61239c
commit
fc96af5014
3 changed files with 137 additions and 0 deletions
|
@ -22,6 +22,7 @@ import { ActionPayload } from "../../dispatcher/payloads";
|
|||
import { AsyncStoreWithClient } from "../AsyncStoreWithClient";
|
||||
import defaultDispatcher from "../../dispatcher/dispatcher";
|
||||
import { MessageEventPreview } from "./previews/MessageEventPreview";
|
||||
import { PollStartEventPreview } from "./previews/PollStartEventPreview";
|
||||
import { TagID } from "./models";
|
||||
import { CallInviteEventPreview } from "./previews/CallInviteEventPreview";
|
||||
import { CallAnswerEventPreview } from "./previews/CallAnswerEventPreview";
|
||||
|
@ -29,6 +30,7 @@ import { CallHangupEvent } from "./previews/CallHangupEvent";
|
|||
import { StickerEventPreview } from "./previews/StickerEventPreview";
|
||||
import { ReactionEventPreview } from "./previews/ReactionEventPreview";
|
||||
import { UPDATE_EVENT } from "../AsyncStore";
|
||||
import { POLL_START_EVENT_TYPE } from "../../polls/consts";
|
||||
|
||||
// Emitted event for when a room's preview has changed. First argument will the room for which
|
||||
// the change happened.
|
||||
|
@ -39,6 +41,10 @@ const PREVIEWS = {
|
|||
isState: false,
|
||||
previewer: new MessageEventPreview(),
|
||||
},
|
||||
[POLL_START_EVENT_TYPE.name]: {
|
||||
isState: false,
|
||||
previewer: new PollStartEventPreview(),
|
||||
},
|
||||
'm.call.invite': {
|
||||
isState: false,
|
||||
previewer: new CallInviteEventPreview(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue