UNPKG

matrix-react-sdk

Version:
23 lines (22 loc) 1.11 kB
import { MatrixClient, Room } from "matrix-js-sdk/src/matrix"; import { AsyncActionPayload } from "../dispatcher/payloads"; import { TagID } from "../stores/room-list/models"; export default class RoomListActions { /** * Creates an action thunk that will do an asynchronous request to * tag room. * * @param {MatrixClient} matrixClient the matrix client to set the * account data on. * @param {Room} room the room to tag. * @param {string} oldTag the tag to remove (unless oldTag ==== newTag) * @param {string} newTag the tag with which to tag the room. * @param {?number} oldIndex the previous position of the room in the * list of rooms. * @param {?number} newIndex the new position of the room in the list * of rooms. * @returns {AsyncActionPayload} an async action payload * @see asyncAction */ static tagRoom(matrixClient: MatrixClient, room: Room, oldTag: TagID | null, newTag: TagID | null, newIndex: number): AsyncActionPayload; }