@flow-industries/id 0.19.3 → 0.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sdk/types/rooms.d.ts +20 -0
- package/package.json +1 -1
|
@@ -73,6 +73,26 @@ export interface RoomDetail extends RoomSummary {
|
|
|
73
73
|
export interface RoomMemberEntry {
|
|
74
74
|
userId: string;
|
|
75
75
|
username: string;
|
|
76
|
+
/**
|
|
77
|
+
* True for a guest account. Guests are ordinary room members and are always
|
|
78
|
+
* listed — this only labels them, so a consumer can gate UI a guest has no
|
|
79
|
+
* target for: `GET /api/users/:username` 404s guest rows by design, yet
|
|
80
|
+
* guests carry a real `[a-z0-9_]+` username, so a "view profile" control
|
|
81
|
+
* built from `username` alone dead-ends.
|
|
82
|
+
*
|
|
83
|
+
* Read it as `entry.isGuest ?? true`. This server always sends it (the
|
|
84
|
+
* column is NOT NULL), but a server older than the field omits it, and a
|
|
85
|
+
* required `boolean` that can arrive `undefined` is a type that lies:
|
|
86
|
+
* `!entry.isGuest` would read a guest as a full account and render the exact
|
|
87
|
+
* dead-end link this prevents — silently, with a clean typecheck. Defaulting
|
|
88
|
+
* the other way is the cheap failure: hiding the link for a full account is
|
|
89
|
+
* cosmetic and self-corrects on the next deploy.
|
|
90
|
+
*
|
|
91
|
+
* Note the default is the opposite of `FlowUser.isGuest`, where `undefined`
|
|
92
|
+
* means *not* a guest. That one is optional because many `{ id, username }`
|
|
93
|
+
* producers omit it; this one because a whole deployment might.
|
|
94
|
+
*/
|
|
95
|
+
isGuest?: boolean;
|
|
76
96
|
role: RoomRole;
|
|
77
97
|
joinedAt: string;
|
|
78
98
|
}
|