Avoid using deprecated exports & methods from matrix-js-sdk (#12359)
This commit is contained in:
parent
11912a0da0
commit
4941327c78
24 changed files with 73 additions and 80 deletions
|
@ -73,7 +73,10 @@ describe("EventUtils", () => {
|
|||
type: EventType.RoomMessage,
|
||||
sender: userId,
|
||||
});
|
||||
redactedEvent.makeRedacted(redactedEvent);
|
||||
redactedEvent.makeRedacted(
|
||||
redactedEvent,
|
||||
new Room(redactedEvent.getRoomId()!, mockClient, mockClient.getUserId()!),
|
||||
);
|
||||
|
||||
const stateEvent = new MatrixEvent({
|
||||
type: EventType.RoomTopic,
|
||||
|
|
|
@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { EventType, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { EventType, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { shouldDisplayAsBeaconTile } from "../../../src/utils/beacon/timeline";
|
||||
import { makeBeaconInfoEvent } from "../../test-utils";
|
||||
import { makeBeaconInfoEvent, stubClient } from "../../test-utils";
|
||||
|
||||
describe("shouldDisplayAsBeaconTile", () => {
|
||||
const userId = "@user:server";
|
||||
|
@ -26,7 +26,7 @@ describe("shouldDisplayAsBeaconTile", () => {
|
|||
const notLiveBeacon = makeBeaconInfoEvent(userId, roomId, { isLive: false });
|
||||
const memberEvent = new MatrixEvent({ type: EventType.RoomMember });
|
||||
const redactedBeacon = makeBeaconInfoEvent(userId, roomId, { isLive: false });
|
||||
redactedBeacon.makeRedacted(redactedBeacon);
|
||||
redactedBeacon.makeRedacted(redactedBeacon, new Room(roomId, stubClient(), userId));
|
||||
|
||||
it("returns true for a beacon with live property set to true", () => {
|
||||
expect(shouldDisplayAsBeaconTile(liveBeacon)).toBe(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue