From 37fffcd5f364c45484d30ca39c200ffd003a1d38 Mon Sep 17 00:00:00 2001
From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
Date: Thu, 23 Oct 2025 18:58:38 +0400
Subject: [PATCH] update
---
docs/rfcs/2025-10-20-chat-relays.md | 86 +++++++++++++----------------
1 file changed, 39 insertions(+), 47 deletions(-)
diff --git a/docs/rfcs/2025-10-20-chat-relays.md b/docs/rfcs/2025-10-20-chat-relays.md
index d2648f019b..0ad3ba4dbc 100644
--- a/docs/rfcs/2025-10-20-chat-relays.md
+++ b/docs/rfcs/2025-10-20-chat-relays.md
@@ -47,54 +47,53 @@ par With each relay
note right of R: Relay status: Accepted
note left of O: Relay status: Accepted
note over O, R: RPC connection
with relay is ready
- O ->> R: 11. Connect via relay link
(share same owner key)
- deactivate O
- R -->> O: Accept messaging connection
- activate O
- note right of R: Relay status: Accepted,
"Connected" implied from
messaging connection
- note left of O: Relay status: Accepted,
"Connected" implied from
messaging connection
+ opt Protocol extension - 2 connections
+ O ->> R: 11*. Connect via relay link
(share same owner key)
+ deactivate O
+ R -->> O: Accept messaging connection
+ activate O
+ note right of R: Relay status: Accepted,
"Connected" implied from
messaging connection
+ note left of O: Relay status: Accepted,
"Connected" implied from
messaging connection
+ note over O, R: Owner: Messaging connection with relay is ready,
relay link is tested
+ end
create participant M as Member
R --> M:
- note over R, M: At this point relay can accept
connection requests from members,
relay won't check group link
until receives x.grp.relay.ready
(won't auto-remove itself)
+ note over R, M: At this point relay can accept
connection requests from members
O ->> OSMP: 12. Update group link
(add relay link)
deactivate O
OSMP -->> O: Group link updated
- activate O
- O ->> R: 13. Notify relay
(x.grp.relay.ready)
- deactivate O
- activate R
note left of O: Relay status: Active
- note right of R: Relay status: Active
- par Start relay checking thread
- R ->> OSMP: 14. Retrieve group link data
- deactivate R
- OSMP -->> R: Group link data
- activate R
- R ->> R: 15. Validate relay link
is present in group link
- opt Relay link absent
- R ->> R: 16. Remove self from group
(relay removal protocol)
- end
- deactivate R
- end
- note over O, R: Owner: Messaging connection with relay is ready,
relay link is tested
Relay: Relay link is active
end
-O -->> M: 17. Share group short link
(social, out-of-band)
+
+note over O, M: Chat relay checks link - monitoring
+
+loop Periodically
+ R ->> OSMP: Retrieve group link data for served gorup
+ OSMP -->> R: Group link data
+ activate R
+ R ->> R: Check relay link present
+ deactivate R
+ note right of R: Relay status: Active
+end
note over O, M: New member connects
-M ->> OSMP: 18. Retrieve short link data
+O -->> M: 13. Share group link
(social, out-of-band)
+M ->> OSMP: 14. Retrieve short link data
par RPC connection
- M ->> R: 19a. Connect via relay link
-and Messaging connection
- M ->> R: 19b. Connect via relay link
(share same member key/
identifier to correlate)
+ M ->> R: 15a. Connect via relay link
+and
+ opt Protocol extension - Messaging connection
+ M ->> R: 15b*. Connect via relay link
(share same member key/
identifier to correlate)
+ end
end
note over O, M: Message forwarding
-O ->> R: 20. Send message
-R ->> M: 21. Forward message
+O ->> R: 16. Send message
+R ->> M: 17. Forward message
activate M
-M ->> M: 22. Deduplicate message
+M ->> M: 18. Deduplicate message
deactivate M
```
@@ -142,7 +141,7 @@ sequenceDiagram
participant RSMP as Chat relay
SMP server
participant M as Member
-note over O, M: Scenario 1. Owner deletes chat relay, notifies relay
+note over O, M: Owner deletes chat relay, notifies relay
O ->> OSMP: Remove relay link
(update group link data)
O ->> R: Delete chat relay
(x.grp.mem.del)
over RPC connection
@@ -156,20 +155,13 @@ note over O, M: Scenario 2. Owner deletes chat relay, fails to notify relay
O ->> OSMP: Remove relay link
(update group link data)
O --x R: Fail to notify relay
-loop Chat relay periodic checks
- R ->> OSMP: Retrieve group link data for served gorup
- OSMP -->> R: Group link data
- activate R
- R ->> R: Check relay link present
- deactivate R
- opt Relay link absent
- par Chat relay to SMP
- destroy RSMP
- R ->> RSMP: Delete relay link
- and Chat relay to members
- destroy R
- R ->> M: Notify relay is deleted
over RPC connection
- end
+opt Chat relay identifies
connection with owner is deleted
+ par Chat relay to SMP
+ destroy RSMP
+ R ->> RSMP: Delete relay link
+ and Chat relay to members
+ destroy R
+ R ->> M: Notify relay is deleted
over RPC connection
end
end