Live location share - forward latest location (PSF-1044) (#8860)

* handle beacon location events in ForwardDialog

* add transformer for forwarded events in MessageContextMenu

* remove canForward

* update snapshots for beacon model change

* add comments

* fix bad copy pasted test

* add test for beacon locations
This commit is contained in:
Kerry 2022-06-17 15:27:08 +02:00 committed by GitHub
parent 0a90674e89
commit b51ef246ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 292 additions and 81 deletions

View file

@ -281,14 +281,6 @@ export const isLocationEvent = (event: MatrixEvent): boolean => {
);
};
export function canForward(event: MatrixEvent): boolean {
return !(
M_POLL_START.matches(event.getType()) ||
// disallow forwarding until psf-1044
M_BEACON_INFO.matches(event.getType())
);
}
export function hasThreadSummary(event: MatrixEvent): boolean {
return event.isThreadRoot && event.getThread()?.length && !!event.getThread().replyToEvent;
}