Skip to content

Commit de1ca7f

Browse files
committed
api: Add realmWaitingPeriodThreshold to InitialSnapshot
This is necessary in the next commit(s) where wee need to determine if a a user has become a full member. For how to determine if a user is a full member, see: https://zulip.com/api/roles-and-permissions#determining-if-a-user-is-a-full-member
1 parent 485dd88 commit de1ca7f

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

lib/api/model/initial_snapshot.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ class InitialSnapshot {
6464

6565
final List<UserTopicItem>? userTopics; // TODO(server-6)
6666

67+
/// The number of days until a user's account is treated as a full member.
68+
///
69+
/// Search for "realm_waiting_period_threshold" in https://zulip.com/api/register-queue.
70+
///
71+
/// For how to determine if a user is a full member, see:
72+
/// https://zulip.com/api/roles-and-permissions#determining-if-a-user-is-a-full-member
73+
final int realmWaitingPeriodThreshold;
74+
6775
final Map<String, RealmDefaultExternalAccount> realmDefaultExternalAccounts;
6876

6977
final int maxFileUploadSizeMib;
@@ -115,6 +123,7 @@ class InitialSnapshot {
115123
required this.streams,
116124
required this.userSettings,
117125
required this.userTopics,
126+
required this.realmWaitingPeriodThreshold,
118127
required this.realmDefaultExternalAccounts,
119128
required this.maxFileUploadSizeMib,
120129
required this.realmUsers,

lib/api/model/initial_snapshot.g.dart

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/example_data.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ InitialSnapshot initialSnapshot({
713713
List<ZulipStream>? streams,
714714
UserSettings? userSettings,
715715
List<UserTopicItem>? userTopics,
716+
int? realmWaitingPeriodThreshold,
716717
Map<String, RealmDefaultExternalAccount>? realmDefaultExternalAccounts,
717718
int? maxFileUploadSizeMib,
718719
List<User>? realmUsers,
@@ -745,6 +746,7 @@ InitialSnapshot initialSnapshot({
745746
emojiset: Emojiset.google,
746747
),
747748
userTopics: userTopics,
749+
realmWaitingPeriodThreshold: realmWaitingPeriodThreshold ?? 0,
748750
realmDefaultExternalAccounts: realmDefaultExternalAccounts ?? {},
749751
maxFileUploadSizeMib: maxFileUploadSizeMib ?? 25,
750752
realmUsers: realmUsers ?? [],

0 commit comments

Comments
 (0)