Skip to content

feat(messaging): add direct messaging backend (conversations, cursor … - #72

Merged
aji70 merged 2 commits into
MyFanss:mainfrom
martinzhames:feature/dm-messaging-backend
Jul 29, 2026
Merged

feat(messaging): add direct messaging backend (conversations, cursor …#72
aji70 merged 2 commits into
MyFanss:mainfrom
martinzhames:feature/dm-messaging-backend

Conversation

@martinzhames

Copy link
Copy Markdown
Contributor

closes #50

Implemented the backend foundation for the Direct Messaging system, introducing secure conversation management, message exchange, cursor-based pagination, read receipts, and essential abuse protection.

What Changed
Added Conversation and Message entities.
Implemented get-or-create conversation flow to ensure unique fan–creator conversations.
Added inbox and message retrieval endpoints with cursor-based pagination.
Implemented message sending with idempotency support (Idempotency-Key/clientId).
Added endpoint to mark messages as read.
Enforced participant authorization to prevent unauthorized access.
Added request validation for message content.
Implemented rate limiting for message sending.
Prevented soft-deleted users from creating new messages.
Documented conversation access behavior to avoid information leakage.
Added comprehensive test coverage for conversation creation, messaging, pagination, read receipts, idempotency, authorization, validation, rate limiting, and authentication.
Impact

This PR delivers a production-ready backend stub for direct messaging, providing a secure and scalable API that supports the frontend messaging experience while establishing the foundation for future real-time messaging features.

martinzhames and others added 2 commits July 30, 2026 00:19
…messages, read state)

Adds a production-shaped DM stub: get-or-create conversations by unique
fan/creator pair, participant-only authz, cursor-paginated inbox and
message lists, idempotent sends (clientId/Idempotency-Key), read
receipts, a per-user rate-limit guard, and soft-deleted-user blocking.
@aji70
aji70 merged commit b30303b into MyFanss:main Jul 29, 2026
0 of 2 checks passed
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.

Direct Messaging Backend — Conversations, Cursor Messages, Read State (Hard)

2 participants