sequenceDiagram
participant M as N existing
members
participant A as Alice
participant B as Bob
participant C as Existing
contact
note over A, B: 1. send and accept group invitation
A ->> B: x.grp.inv
invite Bob to group
(via contact connection)
B ->> A: x.grp.acpt
accept invitation
(via member connection)
establish group member connection
note over M, B: 2. introduce new member Bob to all existing members
A ->> M: x.grp.mem.new
"announce" Bob
to existing members
(via member connections)
loop batched
A ->> B: x.grp.mem.intro * N
"introduce" members and
their chat protocol versions
(via member connection)
note over B: prepare group member connections
opt chat protocol compatible version < 2
note over B: prepare direct connections
end
B ->> A: x.grp.mem.inv * N
"invitations" to connect
for all members
(via member connection)
end
A ->> M: x.grp.mem.fwd
forward "invitations" and
Bob's chat protocol version
to all members
(via member connections)
note over M, B: 3. establish direct and group member connections
M ->> B: establish group member connection
opt chat protocol compatible version < 2
M ->> B: establish direct connection
note over M, C: 4. deduplicate new contact
B ->> M: x.info.probe
"probe" is sent to all new members
B ->> C: x.info.probe.check
"probe" hash,
in case contact and
member profiles match
C ->> B: x.info.probe.ok
original "probe",
in case contact and member
are the same user
note over B: merge existing and new contacts if received and sent probe hashes match
end