Display started polls in timeline (without votes) (behind labs setting) (#7088)

* Display started polls in timeline (without votes)

* Update i18n info

* Keep original background colour of poll options, even on hover

* Show full avatar above a poll message
This commit is contained in:
Andy Balaam 2021-11-10 15:44:57 +00:00 committed by GitHub
parent 8ea551fb6d
commit 431b69ee49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 229 additions and 5 deletions

View file

@ -24,16 +24,18 @@ export const POLL_KIND_UNDISCLOSED = new UnstableValue("m.poll.undisclosed", "or
// TODO: [TravisR] Use extensible events library when ready
const TEXT_NODE_TYPE = "org.matrix.msc1767.text";
export interface IPollAnswer extends IContent {
id: string;
[TEXT_NODE_TYPE]: string;
}
export interface IPollContent extends IContent {
[POLL_START_EVENT_TYPE.name]: {
kind: string; // disclosed or undisclosed (untypeable for now)
question: {
[TEXT_NODE_TYPE]: string;
};
answers: {
id: string;
[TEXT_NODE_TYPE]: string;
}[];
answers: IPollAnswer[];
};
[TEXT_NODE_TYPE]: string;
}