Add list_messages method — read group message history #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Discovered scope from GroupMe incident session (2026-03-25). Remote SSH workflow needs GroupMe as bidirectional communication channel.
Repo
forgejo_admin/groupme-sdkUser Story
As platform operator working via SSH,
I want to read GroupMe message history,
So that I can see messages, images, and context Marcus sends without leaving the terminal.
Context
The SDK currently only has
send_message. There's no way to read messages. When Lucas is SSH'd into the platform, GroupMe is the communication channel with Marcus. Reading messages (including image attachments) is essential for this workflow.GroupMe API:
GET /groups/{group_id}/messageswith paramsbefore_id,since_id,after_id,limit(max 100).File Targets
Files to modify:
src/groupme_sdk/messages.py— ADDlist_messages(group_id, before_id=None, since_id=None, after_id=None, limit=20)method. Returns list of message dicts with text, attachments, sender info, timestamps.Files NOT to touch:
Acceptance Criteria
list_messages(group_id)returns recent messages (default 20)before_idparam for pagination (older messages)since_idparam for new messages since a known message_request, returns dicts)Test Expectations
cd ~/groupme-sdk && pytest tests/Constraints
Checklist
Related
project-groupme-westside— GroupMe project pageScope Review: READY
Review note:
review-378-2026-03-25Scope is solid — all template sections present, file targets verified against codebase, dependencies documented. One implementation note:
_requestwill return{"count": N, "messages": [...]}after envelope strip, so the method should extractresult.get("messages", [])to match the acceptance criteria's "returns list of message dicts" expectation.