Telegram: capture shared locations and venues #23

Closed
opened 2026-07-05 07:48:31 +08:00 by weiwen · 0 comments
Owner

What to build

Let evie ingest Telegram location messages so pi can geotag notes. Today the Telegram handler only handles text and photos; a shared pin or venue is silently ignored.

When the user shares a location, evie extracts it into a text marker prepended/passed to pi, then the normal streamed-response pipeline runs unchanged:

  • Bare pin (msg.location(), no name — Telegram provides none): [Location: <lat>, <lon>]
  • Venue (msg.venue(), a named POI): [Location: <title>, <address> (<lat>, <lon>)]
  • Live location: take the first fix only; ignore the edited-message update stream.

This is a pure text branch in the message-content extraction — no temp files, no protocol change, no new config. pi decides what to do with the location (mechanism in evie, policy in the system prompt).

Acceptance criteria

  • Sharing a dropped pin produces a [Location: lat, lon] prompt to pi and a normal streamed reply
  • Sharing a venue includes its title and address alongside the coordinates
  • A live-location share is handled as a single one-shot point; subsequent live edits do not spawn extra pi turns
  • Existing text and photo handling is unaffected
  • Unit test(s) cover the location and venue extraction branches, matching existing tests/ conventions

Blocked by

None - can start immediately

## What to build Let evie ingest Telegram location messages so pi can geotag notes. Today the Telegram handler only handles text and photos; a shared pin or venue is silently ignored. When the user shares a location, evie extracts it into a text marker prepended/passed to pi, then the normal streamed-response pipeline runs unchanged: - Bare pin (`msg.location()`, no name — Telegram provides none): `[Location: <lat>, <lon>]` - Venue (`msg.venue()`, a named POI): `[Location: <title>, <address> (<lat>, <lon>)]` - Live location: take the first fix only; ignore the edited-message update stream. This is a pure text branch in the message-content extraction — no temp files, no protocol change, no new config. pi decides what to do with the location (mechanism in evie, policy in the system prompt). ## Acceptance criteria - [ ] Sharing a dropped pin produces a `[Location: lat, lon]` prompt to pi and a normal streamed reply - [ ] Sharing a venue includes its title and address alongside the coordinates - [ ] A live-location share is handled as a single one-shot point; subsequent live edits do not spawn extra pi turns - [ ] Existing text and photo handling is unaffected - [ ] Unit test(s) cover the location and venue extraction branches, matching existing `tests/` conventions ## Blocked by None - can start immediately
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
weiwen/evie#23
No description provided.