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

@ -62,7 +62,11 @@ describe('EventUtils', () => {
});
redactedEvent.makeRedacted(redactedEvent);
const stateEvent = makeBeaconInfoEvent(userId, roomId);
const stateEvent = new MatrixEvent({
type: EventType.RoomTopic,
state_key: '',
});
const beaconInfoEvent = makeBeaconInfoEvent(userId, roomId);
const roomMemberEvent = new MatrixEvent({
type: EventType.RoomMember,
@ -155,6 +159,7 @@ describe('EventUtils', () => {
['poll start event', pollStartEvent],
['event with empty content body', emptyContentBody],
['event with a content body', niceTextMessage],
['beacon_info event', beaconInfoEvent],
])('returns true for %s', (_description, event) => {
expect(isContentActionable(event)).toBe(true);
});
@ -325,6 +330,10 @@ describe('EventUtils', () => {
const event = makePollStartEvent('Who?', userId);
expect(canForward(event)).toBe(false);
});
it('returns false for a beacon_info event', () => {
const event = makeBeaconInfoEvent(userId, roomId);
expect(canForward(event)).toBe(false);
});
it('returns true for a room message event', () => {
const event = new MatrixEvent({
type: EventType.RoomMessage,