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 {
|
|||
BeaconIdentifier,
|
||||
BeaconEvent,
|
||||
MatrixEvent,
|
||||
RelationType,
|
||||
Room,
|
||||
RoomMember,
|
||||
RoomState,
|
||||
|
@ -449,20 +448,12 @@ export class OwnBeaconStore extends AsyncStoreWithClient<OwnBeaconStoreState> {
|
|||
...update,
|
||||
};
|
||||
|
||||
const newContent = makeBeaconInfoContent(timeout,
|
||||
const updateContent = makeBeaconInfoContent(timeout,
|
||||
live,
|
||||
description,
|
||||
assetType,
|
||||
timestamp,
|
||||
);
|
||||
const updateContent = {
|
||||
...newContent,
|
||||
"m.new_content": newContent,
|
||||
"m.relates_to": {
|
||||
"rel_type": RelationType.Replace,
|
||||
"event_id": beacon.beaconInfoId,
|
||||
},
|
||||
};
|
||||
|
||||
await this.matrixClient.unstable_setLiveBeacon(beacon.roomId, updateContent);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue