1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-23 17:02:25 +03:00
Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
Timo K
2025-08-27 14:00:51 +02:00
parent 41a2f477d5
commit 209eecd813

View File

@@ -30,6 +30,48 @@ import { Logger, logger as rootLogger } from "src/logger.ts";
import { ActionScheduler, ActionUpdate } from "./MembershipManagerActionScheduler.ts";
import { isMyMembership, Status } from "./types.ts";
/* MembershipActionTypes:
On Join: ───────────────┐ ┌───────────────(1)───────────┐
▼ ▼ │
┌────────────────┐ │
│SendDelayedEvent│ ──────(2)───┐ │
└────────────────┘ │ │
│(3) │ │
▼ │ │
┌─────────────┐ │ │
┌──────(4)───│SendJoinEvent│────(4)─────┐ │ │
│ └─────────────┘ │ │ │
│ ┌─────┐ ┌──────┐ │ │ │
▼ ▼ │ │ ▼ ▼ ▼ │
┌────────────┐ │ │ ┌───────────────────┐ │
│UpdateExpiry│ (s) (s)|RestartDelayedEvent│ │
└────────────┘ │ │ └───────────────────┘ │
│ │ │ │ │ │
└─────┘ └──────┘ └───────┘
On Leave: ───────── STOP ALL ABOVE
┌────────────────────────────────┐
│ SendScheduledDelayedLeaveEvent │
└────────────────────────────────┘
│(5)
┌──────────────┐
│SendLeaveEvent│
└──────────────┘
(1) [Not found error] results in resending the delayed event
(2) [hasMemberEvent = true] Sending the delayed event if we
already have a call member event results jumping to the
RestartDelayedEvent loop directly
(3) [hasMemberEvent = false] if there is not call member event
sending it is the next step
(4) Both (UpdateExpiry and RestartDelayedEvent) actions are
scheduled when successfully sending the state event
(5) Only if delayed event sending failed (fallback)
(s) Successful restart/resend
*/
/**
* The different types of actions the MembershipManager can take.
* @internal