Repository navigation
Conversation
Members can now contact each other about a listing through the API. - Conversation, ConversationParticipant and Message models with a migration. One conversation per listing and interested member, enforced by a unique index so concurrent contact requests converge on one row. - POST /conversations starts or reuses a conversation; GET /conversations, GET /conversations/:id, GET /conversations/:id/messages and POST /conversations/:id/messages, all participant-only. - Opening requires an ACTIVE listing owned by someone else. Participants keep reading and writing after the listing is archived. - Non-participants get 404 so a conversation id never confirms existence. - Lists are ordered by activity or time, then id, for stable pages. - Shared safe member shape in users/public-member.ts, also used by the listing detail. No phone, location or moderation state in responses. - Unit spec and end-to-end spec (owner, interested member, stranger). - OpenAPI document and API client regenerated. Closes Code-for-Senegal#4 Claude-Session: https://claude.ai/code/session_01VGBQpJZopVVa1AWeVsNaWg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4
Members can now start a private conversation about an ACTIVE listing and exchange text messages through authenticated REST endpoints. This is the API foundation; web sign-in, messaging UI, attachments, and Socket.IO delivery remain follow-up work.
Behavior
Validation
The migration preserves the hand-written PostGIS and search indexes.