Live location share - enable reply and react to tiles (#8721)

* test most basic paths in messageactionbar

Signed-off-by: Kerry Archibald <kerrya@element.io>

* tidy

Signed-off-by: Kerry Archibald <kerrya@element.io>

* use rtl for MessageActionBar test

Signed-off-by: Kerry Archibald <kerrya@element.io>

* make beacon_info events semi actionable

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove log

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test thread exception for beacon

Signed-off-by: Kerry Archibald <kerrya@element.io>

* eat click events in beacon status to stop jumping from reply tile

Signed-off-by: Kerry Archibald <kerrya@element.io>

* set max width on beaconbody for render in thread panel
This commit is contained in:
Kerry 2022-06-02 17:43:19 +02:00 committed by GitHub
parent a74b9a7083
commit 79a2dfe171
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 143 additions and 10 deletions

View file

@ -20,6 +20,7 @@ import { MatrixClient } from 'matrix-js-sdk/src/client';
import { logger } from 'matrix-js-sdk/src/logger';
import { M_POLL_START } from "matrix-events-sdk";
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
import { M_BEACON_INFO } from 'matrix-js-sdk/src/@types/beacon';
import { MatrixClientPeg } from '../MatrixClientPeg';
import shouldHideEvent from "../shouldHideEvent";
@ -52,7 +53,8 @@ export function isContentActionable(mxEvent: MatrixEvent): boolean {
}
} else if (
mxEvent.getType() === 'm.sticker' ||
M_POLL_START.matches(mxEvent.getType())
M_POLL_START.matches(mxEvent.getType()) ||
M_BEACON_INFO.matches(mxEvent.getType())
) {
return true;
}
@ -277,7 +279,9 @@ export const isLocationEvent = (event: MatrixEvent): boolean => {
export function canForward(event: MatrixEvent): boolean {
return !(
M_POLL_START.matches(event.getType())
M_POLL_START.matches(event.getType()) ||
// disallow forwarding until psf-1044
M_BEACON_INFO.matches(event.getType())
);
}