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:
parent
035786aae0
commit
eaf13d490e
4 changed files with 186 additions and 30 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue