diff --git a/docs/rfcs/2025-10-20-chat-relays.md b/docs/rfcs/2025-10-20-chat-relays.md index 4ccd3c48aa..f080171692 100644 --- a/docs/rfcs/2025-10-20-chat-relays.md +++ b/docs/rfcs/2025-10-20-chat-relays.md @@ -106,14 +106,14 @@ Notes: - For relay: - Relay tracks its own status in group (`GroupRelayOwnStatus`). - - Step 6. Upon receiving invitation from group owner, initial relay status is `RSGInvited`. - Relay should create its link for the group, should be done via asynchronous agent action, status moves to `RSGLinkCreated`. + - Step 6. Upon receiving invitation from group owner, initial relay status is `GROSInvited`. + Relay should create its link for the group, should be done via asynchronous agent action, status moves to `GROSLinkCreated`. Continuation is to save and associate relay link with group record, send `x.grp.relay.acpt`, - status moves to `RSGAccepted`. + status moves to `GROSAccepted`. - Relay link connection is a user contact link, more specifically group link - we can re-use group link machinery that links `user_contact_links` to `groups`. - - Step 10, 11. Upon receiving `x.grp.info` from owner, if relay is in `RSGAccepted` status, status moves to `RSGNotified`. - Retrieve short link (asynchronous agent action? synchronous with retry?). If relay link is present send confirmation to owner `x.grp.relay.ready`, status moves to `RSGConfirmed`. Otherwise break (recovery for owner is to re-add relay). - - Should recover in `RSGInvited`, `RSGLinkCreated`, `RSGNotified` statuses. + - Step 10, 11. Upon receiving `x.grp.info` from owner, if relay is in `GROSAccepted` status, status moves to `GROSNotified`. + Retrieve short link (asynchronous agent action? synchronous with retry?). If relay link is present send confirmation to owner `x.grp.relay.ready`, status moves to `GROSConfirmed`. Otherwise break (recovery for owner is to re-add relay). + - Should recover in `GROSInvited`, `GROSLinkCreated`, `GROSNotified` statuses. - Similar to owner recovery mechanism - maintenance process on start? ## Protocol for removing chat relay from group, restoring connection to group diff --git a/src/Simplex/Chat/Types.hs b/src/Simplex/Chat/Types.hs index 10ab4da63f..edbb26b4c5 100644 --- a/src/Simplex/Chat/Types.hs +++ b/src/Simplex/Chat/Types.hs @@ -978,11 +978,11 @@ data GroupRelayStatus -- Own status tracked by relay in a group data GroupRelayOwnStatus - = RSGInvited - | RSGLinkCreated - | RSGAccepted - | RSGNotified - | RSGConfirmed + = GROSInvited + | GROSLinkCreated + | GROSAccepted + | GROSNotified + | GROSConfirmed data GroupSupportChat = GroupSupportChat { chatTs :: UTCTime,