Live location share - disallow message pinning (PSF-1084) (#8928)

* unmock isContentActionable

* test message pinning

* disallow pinning for beacon events

* try to make tests more readable
This commit is contained in:
Kerry 2022-06-29 09:11:33 +02:00 committed by GitHub
parent 035786aae0
commit eaf13d490e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 186 additions and 30 deletions

View file

@ -25,9 +25,9 @@ import { ForwardableEventTransformFunction } from "./types";
export const getForwardableBeaconEvent: ForwardableEventTransformFunction = (event, cli) => {
const room = cli.getRoom(event.getRoomId());
const beacon = room.currentState.beacons?.get(getBeaconInfoIdentifier(event));
const latestLocationEvent = beacon.latestLocationEvent;
const latestLocationEvent = beacon?.latestLocationEvent;
if (beacon.isLive && latestLocationEvent) {
if (beacon?.isLive && latestLocationEvent) {
return latestLocationEvent;
}
return null;