Use constants from js-sdk in polls code (#7381)

This commit is contained in:
Andy Balaam 2021-12-15 14:26:26 +00:00 committed by GitHub
parent 69c4a0cebc
commit 43839adec0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 25 additions and 101 deletions

View file

@ -17,6 +17,7 @@ limitations under the License.
import { Room } from "matrix-js-sdk/src/models/room";
import { isNullOrUndefined } from "matrix-js-sdk/src/utils";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
import { POLL_START_EVENT_TYPE } from "matrix-js-sdk/src/@types/polls";
import { ActionPayload } from "../../dispatcher/payloads";
import { AsyncStoreWithClient } from "../AsyncStoreWithClient";
@ -30,7 +31,6 @@ 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";
import SettingsStore from "../../settings/SettingsStore";
// Emitted event for when a room's preview has changed. First argument will the room for which

View file

@ -15,12 +15,13 @@ limitations under the License.
*/
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
import { POLL_START_EVENT_TYPE } from "matrix-js-sdk/src/@types/polls";
import { TEXT_NODE_TYPE } from "matrix-js-sdk/src/@types/extensible_events";
import { IPreview } from "./IPreview";
import { TagID } from "../models";
import { _t, sanitizeForTranslation } from "../../../languageHandler";
import { getSenderName, isSelf, shouldPrefixMessagesIn } from "./utils";
import { POLL_START_EVENT_TYPE, TEXT_NODE_TYPE } from "../../../polls/consts";
import MatrixClientContext from "../../../contexts/MatrixClientContext";
export class PollStartEventPreview implements IPreview {