We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isFullMember
User
1 parent 5576d17 commit b467f4cCopy full SHA for b467f4c
lib/api/model/model.dart
@@ -258,6 +258,13 @@ class User {
258
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
259
260
Map<String, dynamic> toJson() => _$UserToJson(this);
261
+
262
+ // This is determined based on:
263
+ // https://zulip.com/api/roles-and-permissions#determining-if-a-user-is-a-full-member
264
+ bool isFullMember(int realmWaitingPeriodThreshold) {
265
+ final dateJoined = DateTime.parse(this.dateJoined);
266
+ return DateTime.now().difference(dateJoined).inDays >= realmWaitingPeriodThreshold;
267
+ }
268
}
269
270
/// As in [User.profileData].
0 commit comments