From d6bce101177e11af07f293e09e85a87947f235ba Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Wed, 22 Oct 2025 18:26:21 +0400 Subject: [PATCH] update --- docs/rfcs/2025-10-20-chat-relays.md | 53 +++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/docs/rfcs/2025-10-20-chat-relays.md b/docs/rfcs/2025-10-20-chat-relays.md index 881cd75dda..0d53065017 100644 --- a/docs/rfcs/2025-10-20-chat-relays.md +++ b/docs/rfcs/2025-10-20-chat-relays.md @@ -181,6 +181,59 @@ create participant M as Member O -->> M: 8. Share group short link
(social, out-of-band) ``` +### Update: Establishing connection pairs + +- [Channels forwarding rfc](./2025-08-11-channels-forwarding.md) discussed creating connections pairs between relay and members with different priority for passing regular messages and for relay responding to member requests. + + In protocol for adding chat relays we can replace explicit notification/acknowledgement steps with relay link test by owner, establishing second connection via relay link to be used for passing messages. + +- Client can "know" link that will be created before creating it on server - so we can add it to profile before adding profile to group short link data. + + TODO agent prepare connection api to return link that will be created. + +- Pass only link in invitation step for relay to retrieve group profile and check it before accepting. + +```mermaid +sequenceDiagram + participant O as Owner + participant OSMP as Owner's
SMP server + participant R as Chat relay(s) + participant RSMP as Chat relays'
SMP server(s) + +note over O, RSMP: Owner creates new group, adds chat relays + +O ->> O: 1. Create new group
(local, user action) +O ->> O: 2. Prepare group link,
owner key (local, agent) +O ->> O: 3. Add link, owner key
to group profile
(local, automatic) +O ->> OSMP: 4. Create group link
with profile as data +O ->> O: 5. Choose chat relays
(local, automatic/user choice) +par With each relay + O ->> R: 6. Contact request
(x.grp.relay.inv
incl. group link) + R ->> OSMP: 7. Retrive group link data + R ->> R: 8. Validate group profile,
verify profile signature + R ->> RSMP: 9. Create relay link + R ->> O: 10. Accept request
(x.grp.relay.acpt
incl. relay link) + note over O, R: Priority connection
with relay is ready + O ->> OSMP: 11. Update short link
(add relay link) + O ->> R: 12. Connect via relay link + note over O, R: Owner: Messages connection with relay is ready,
relay link is tested
Relay: Relay link is active +end +create participant M as Member +O -->> M: 13. Share group short link
(social, out-of-band) + +note over O, M: New member connects + +M ->> OSMP: 14. Retrieve short link data +M ->> R: 15. Connect via relay link(s) + +note over O, M: Message forwarding + +O ->> R: 16. Send message +R ->> M: 17. Forward message +M ->> M: 18. Deduplicate message +``` + + ## Protocol for removing chat relay from group, restoring connection to group ```mermaid