LLS: Remove beacon info illegal replace relation (#8390)
* dont apply illegal replace relation to beacon_info event Signed-off-by: Kerry Archibald <kerrya@element.io> * only display tiles for beacon infos with live prop Signed-off-by: Kerry Archibald <kerrya@element.io> * copyrights Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
763edb7ab9
commit
a3a7c60dd7
5 changed files with 72 additions and 37 deletions
|
@ -20,7 +20,6 @@ import {
|
|||
BeaconEvent,
|
||||
getBeaconInfoIdentifier,
|
||||
MatrixEvent,
|
||||
RelationType,
|
||||
RoomStateEvent,
|
||||
RoomMember,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
|
@ -473,14 +472,6 @@ describe('OwnBeaconStore', () => {
|
|||
const expectedUpdateContent = {
|
||||
...prevEventContent,
|
||||
live: false,
|
||||
["m.new_content"]: {
|
||||
...prevEventContent,
|
||||
live: false,
|
||||
},
|
||||
["m.relates_to"]: {
|
||||
event_id: alicesRoom1BeaconInfo.getId(),
|
||||
rel_type: RelationType.Replace,
|
||||
},
|
||||
};
|
||||
expect(mockClient.unstable_setLiveBeacon).toHaveBeenCalledWith(
|
||||
room1Id,
|
||||
|
@ -650,14 +641,6 @@ describe('OwnBeaconStore', () => {
|
|||
const expectedUpdateContent = {
|
||||
...prevEventContent,
|
||||
live: false,
|
||||
["m.new_content"]: {
|
||||
...prevEventContent,
|
||||
live: false,
|
||||
},
|
||||
["m.relates_to"]: {
|
||||
event_id: alicesRoom1BeaconInfo.getId(),
|
||||
rel_type: RelationType.Replace,
|
||||
},
|
||||
};
|
||||
expect(mockClient.unstable_setLiveBeacon).toHaveBeenCalledWith(
|
||||
room1Id,
|
||||
|
@ -683,14 +666,6 @@ describe('OwnBeaconStore', () => {
|
|||
const expectedUpdateContent = {
|
||||
...prevEventContent,
|
||||
live: false,
|
||||
["m.new_content"]: {
|
||||
...prevEventContent,
|
||||
live: false,
|
||||
},
|
||||
["m.relates_to"]: {
|
||||
event_id: alicesRoom1BeaconInfo.getId(),
|
||||
rel_type: RelationType.Replace,
|
||||
},
|
||||
};
|
||||
expect(mockClient.unstable_setLiveBeacon).toHaveBeenCalledWith(
|
||||
room1Id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue