You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03:00
Avoid using deprecated exports & methods from matrix-js-sdk (#12359)
This commit is contained in:
committed by
GitHub
parent
11912a0da0
commit
4941327c78
@ -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);
|
||||
|
Reference in New Issue
Block a user