A location can be sent by the daemon and by nothing else #166

Closed
opened 2026-09-10 15:45:12 -04:00 by Salastil · 1 comment
Owner

sendMatrixLocation (nobilis/src/rpc/methods.rs:3690) works and has no caller.
Verified: zero references anywhere in src/ — not the renderer, not main.

#123 was "stickers and locations can be read but not sent" and was closed. The sticker
half got a UI (src/renderer/src/components/Composer.tsx:821); the location half was
built in the daemon and never wired up, so the issue closed with half of it
unreachable.

What is needed

  • Somewhere to send one from — the composer's attachment menu is where the sticker
    picker already lives.
  • A location to send: the honest minimum is entering coordinates or picking "where I
    am" if the platform will say. Note timeline.rs:216-221 deliberately does not draw
    maps on receive ("shipping tiles from somebody's server on every message that
    mentions a street corner"), and sending should not start doing so either.

Found by the 2026-09-10 coverage review.

`sendMatrixLocation` (`nobilis/src/rpc/methods.rs:3690`) works and has no caller. Verified: **zero references anywhere in `src/`** — not the renderer, not main. #123 was "stickers and locations can be read but not sent" and was closed. The sticker half got a UI (`src/renderer/src/components/Composer.tsx:821`); the location half was built in the daemon and never wired up, so the issue closed with half of it unreachable. **What is needed** - Somewhere to send one from — the composer's attachment menu is where the sticker picker already lives. - A location to send: the honest minimum is entering coordinates or picking "where I am" if the platform will say. Note `timeline.rs:216-221` deliberately does not draw maps on receive ("shipping tiles from somebody's server on every message that mentions a street corner"), and sending should not start doing so either. Found by the 2026-09-10 coverage review.
Salastil added the bug label 2026-09-10 15:45:12 -04:00
Author
Owner

Done in moho 36ae6fd, with tests in nobilis b4055cb.

A button beside the sticker one — for the reason the sticker button sits beside the emoji one: a location is the message rather than something typed into it. Matrix only, being the one service here that carries a place as its own kind of message.

A field rather than a map, deliberately. Drawing one means fetching tiles from somebody's tile server, and the receive side already decided against that — a message mentioning a street corner should not tell a third party it was read (timeline.rs). Sending should not quietly undo the decision receiving made.

The daemon already did the hard part: parse_place accepts a pasted map link (OpenStreetMap, Google Maps, anything with the place in a query parameter), a geo: URI, or two numbers with a comma. That is what people actually have to hand — nobody types coordinates from memory, they copy a link. The label is offered first and the coordinates second, because the label is the part a person reads: a pair of numbers with no name is a pin in the middle of nowhere to whoever receives it.

One thing the field made necessary. parse_place had no tests, and the placeholder now tells somebody in as many words which formats work — a promise in help text is a claim about behaviour, and that belongs in a test. All four hold. The one worth having written down is OpenStreetMap: it puts the zoom level first, so "the first two numbers in this URL" reads a zoom of 15 as a latitude and lands the pin in the Atlantic. The parser reads each link by its own layout for exactly that reason and now says so where it can be checked.

Not live-verified against a homeserver — that needs a real room — but the parsing is covered and the send path is the one #123 already built. 498 tests pass.

Done in moho [36ae6fd](https://git.salastil.com/Salastil/moho/commit/36ae6fd), with tests in nobilis [b4055cb](https://git.salastil.com/Salastil/nobilis/commit/b4055cb). A button beside the sticker one — for the reason the sticker button sits beside the emoji one: a location is the message rather than something typed into it. Matrix only, being the one service here that carries a place as its own kind of message. **A field rather than a map, deliberately.** Drawing one means fetching tiles from somebody's tile server, and the receive side already decided against that — a message mentioning a street corner should not tell a third party it was read (`timeline.rs`). Sending should not quietly undo the decision receiving made. The daemon already did the hard part: `parse_place` accepts a pasted map link (OpenStreetMap, Google Maps, anything with the place in a query parameter), a `geo:` URI, or two numbers with a comma. That is what people actually have to hand — nobody types coordinates from memory, they copy a link. The label is offered first and the coordinates second, because the label is the part a person reads: a pair of numbers with no name is a pin in the middle of nowhere to whoever receives it. **One thing the field made necessary.** `parse_place` had no tests, and the placeholder now tells somebody in as many words which formats work — a promise in help text is a claim about behaviour, and that belongs in a test. All four hold. The one worth having written down is OpenStreetMap: it puts the **zoom level first**, so "the first two numbers in this URL" reads a zoom of 15 as a latitude and lands the pin in the Atlantic. The parser reads each link by its own layout for exactly that reason and now says so where it can be checked. Not live-verified against a homeserver — that needs a real room — but the parsing is covered and the send path is the one #123 already built. 498 tests pass.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Salastil/moho#166