Live location sharing - update beacon tile with latest location (#8265)
* add useBeacon hook Signed-off-by: Kerry Archibald <kerrya@element.io> * update message tile types to work with function comp with ref Signed-off-by: Kerry Archibald <kerrya@element.io> * use beacon hook in beacon body Signed-off-by: Kerry Archibald <kerrya@element.io> * update beacon body with (textual) latest locations, test Signed-off-by: Kerry Archibald <kerrya@element.io> * language in comment Signed-off-by: Kerry Archibald <kerrya@element.io> * comments Signed-off-by: Kerry Archibald <kerrya@element.io> * copyright Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
7ba991cd8c
commit
aecd71ad15
9 changed files with 424 additions and 29 deletions
|
@ -0,0 +1,49 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<MBeaconBody /> renders a live beacon with basic stub 1`] = `
|
||||
<ForwardRef
|
||||
highlightLink=""
|
||||
highlights={Array []}
|
||||
mediaEventHelper={Object {}}
|
||||
mxEvent={
|
||||
Object {
|
||||
"content": Object {
|
||||
"description": undefined,
|
||||
"live": true,
|
||||
"org.matrix.msc3488.asset": Object {
|
||||
"type": "m.self",
|
||||
},
|
||||
"org.matrix.msc3488.ts": 1647270879403,
|
||||
"timeout": 3600000,
|
||||
},
|
||||
"event_id": "$alice-room1-1",
|
||||
"origin_server_ts": 1647270879403,
|
||||
"room_id": "!room:server",
|
||||
"sender": "@alice:server",
|
||||
"state_key": "@alice:server",
|
||||
"type": "org.matrix.msc3672.beacon_info",
|
||||
}
|
||||
}
|
||||
onHeightChanged={[MockFunction]}
|
||||
onMessageAllowed={[MockFunction]}
|
||||
permalinkCreator={Object {}}
|
||||
>
|
||||
<div
|
||||
className="mx_MBeaconBody"
|
||||
>
|
||||
<code>
|
||||
$alice-room1-1
|
||||
</code>
|
||||
|
||||
<span>
|
||||
Beacon "
|
||||
"
|
||||
</span>
|
||||
<span
|
||||
data-test-id="beacon-waiting-for-location"
|
||||
>
|
||||
Waiting for location
|
||||
</span>
|
||||
</div>
|
||||
</ForwardRef>
|
||||
`;
|
Loading…
Add table
Add a link
Reference in a new issue