(userId: string)
| 50 | } |
| 51 | |
| 52 | rejoinUser(userId: string): ManagedHubUser | null { |
| 53 | const user = this.store.getHubUser(userId); |
| 54 | if (!user) return null; |
| 55 | const updated: ManagedHubUser = { |
| 56 | ...user, |
| 57 | status: "pending" as const, |
| 58 | tokenHash: "", |
| 59 | rejoinRequestedAt: Date.now(), |
| 60 | }; |
| 61 | this.store.upsertHubUser(updated); |
| 62 | this.log.info(`Hub: user "${userId}" (${user.username}) requested rejoin, previous status: ${user.status}`); |
| 63 | return updated; |
| 64 | } |
| 65 | |
| 66 | listPendingUsers(): ManagedHubUser[] { |
| 67 | return this.store.listHubUsers("pending"); |
no test coverage detected