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

@ -284,3 +284,7 @@ export const isLocationEvent = (event: MatrixEvent): boolean => {
export function hasThreadSummary(event: MatrixEvent): boolean {
return event.isThreadRoot && event.getThread()?.length && !!event.getThread().replyToEvent;
}
export function canPinEvent(event: MatrixEvent): boolean {
return !M_BEACON_INFO.matches(event.getType());
}