diff --git a/LOTUS_FEATURES.md b/LOTUS_FEATURES.md index bd8ad7690..250114466 100644 --- a/LOTUS_FEATURES.md +++ b/LOTUS_FEATURES.md @@ -724,6 +724,8 @@ Images and videos can be sent with a caption. The caption and media are sent as `m.location` events render an inline map tile using the coordinates from the event content. +Sharing your location (composer → location button) sends an **MSC3488-compliant** `m.location` event: the legacy `geo_uri` plus the `org.matrix.msc3488.location` (uri), `org.matrix.msc3488.asset` (`m.self`), and `org.matrix.msc3488.ts`/`m.ts` blocks, and a human-readable `body`. This makes Lotus-shared locations render as proper pins on Element and other clients instead of falling back to plain text. + ### Deleted Message Placeholders Redacted events display "This message has been deleted" along with the redaction reason if one was provided, rather than leaving a blank gap in the timeline. This is a one-line change in the `eventRenderer` filter. diff --git a/src/app/features/room/RoomInput.tsx b/src/app/features/room/RoomInput.tsx index ca6b3d1de..9ce1d7349 100644 --- a/src/app/features/room/RoomInput.tsx +++ b/src/app/features/room/RoomInput.tsx @@ -251,10 +251,18 @@ export const RoomInput = forwardRef( setLocating(false); const { latitude, longitude } = pos.coords; const geoUri = `geo:${latitude.toFixed(6)},${longitude.toFixed(6)}`; + const ts = Date.now(); + // MSC3488 extensible location: send the geo_uri (legacy) alongside the + // m.location/m.asset/m.ts blocks so Element and other clients render a + // proper "shared location" pin instead of falling back to plain text. mx.sendMessage(roomId, threadRootId ?? null, { msgtype: 'm.location', - body: `Location: ${geoUri}`, + body: `Shared a location: ${geoUri}`, geo_uri: geoUri, + 'org.matrix.msc3488.location': { uri: geoUri }, + 'org.matrix.msc3488.asset': { type: 'm.self' }, + 'org.matrix.msc3488.ts': ts, + 'm.ts': ts, } as any); }, (err) => {