You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-09 08:42:50 +03:00
Add type assertions where we know an event is a room event (has room_id) (#9498)
This commit is contained in:
committed by
GitHub
parent
306a2449e5
commit
b7ff56a726
@@ -6,7 +6,7 @@ Array [
|
||||
Array [
|
||||
Object {
|
||||
"deviceInfo": DeviceInfo {
|
||||
"algorithms": undefined,
|
||||
"algorithms": Array [],
|
||||
"deviceId": "aliceWeb",
|
||||
"keys": Object {},
|
||||
"known": false,
|
||||
@@ -18,7 +18,7 @@ Array [
|
||||
},
|
||||
Object {
|
||||
"deviceInfo": DeviceInfo {
|
||||
"algorithms": undefined,
|
||||
"algorithms": Array [],
|
||||
"deviceId": "aliceMobile",
|
||||
"keys": Object {},
|
||||
"known": false,
|
||||
@@ -37,7 +37,7 @@ Array [
|
||||
Array [
|
||||
Object {
|
||||
"deviceInfo": DeviceInfo {
|
||||
"algorithms": undefined,
|
||||
"algorithms": Array [],
|
||||
"deviceId": "bobDesktop",
|
||||
"keys": Object {},
|
||||
"known": false,
|
||||
|
@@ -28,7 +28,7 @@ import { isSelfLocation } from "../../../src/utils/location";
|
||||
|
||||
describe("isSelfLocation", () => {
|
||||
it("Returns true for a full m.asset event", () => {
|
||||
const content = makeLocationContent("", '0');
|
||||
const content = makeLocationContent("", '0', Date.now());
|
||||
expect(isSelfLocation(content)).toBe(true);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user