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 055eb38 commit 4be9343Copy full SHA for 4be9343
lib/api/model/model.dart
@@ -262,6 +262,13 @@ class User {
262
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
263
264
Map<String, dynamic> toJson() => _$UserToJson(this);
265
+
266
+ // This is determined based on:
267
+ // https://zulip.com/api/roles-and-permissions#determining-if-a-user-is-a-full-member
268
+ bool isFullMember(int realmWaitingPeriodThreshold) {
269
+ final dateJoined = DateTime.parse(this.dateJoined);
270
+ return DateTime.now().difference(dateJoined).inDays >= realmWaitingPeriodThreshold;
271
+ }
272
}
273
274
/// As in [User.profileData].
0 commit comments