Skip to content

fix: scope ~/.odek/media to originating chat (M-14)#71

Merged
jkyberneees merged 1 commit into
mainfrom
fix/m14-chat-scoped-media
Jul 18, 2026
Merged

fix: scope ~/.odek/media to originating chat (M-14)#71
jkyberneees merged 1 commit into
mainfrom
fix/m14-chat-scoped-media

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Closes M-14.

Changes:

  • Add ResolveMediaPathForChat in internal/telegram/media_path.go that scopes the shared ~/.odek/media/ directory to files tagged for the requesting chat (_chat<chatID>_ basename or chat<chatID>/ subdirectory).
  • Wire Telegram send_message and final-answer MEDIA: handling to use the chat-scoped validator.
  • Preserve backward-compatible ResolveMediaPath (no chat ID) for non-Telegram callers.
  • Add regression tests in internal/telegram/media_path_test.go and internal/tool/send_message_test.go.
  • Update AGENTS.md, docs/SECURITY.md, and docs/TELEGRAM.md.

Tested with go test ./... -count=1.

@jkyberneees
jkyberneees merged commit 0053f3f into main Jul 18, 2026
5 of 7 checks passed
@jkyberneees
jkyberneees deleted the fix/m14-chat-scoped-media branch July 18, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant