Skip to content

Commit ea31c88

Browse files
author
chimnayajith
committed
api: Add isArchived to ZulipStream
1 parent 8a67725 commit ea31c88

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

lib/api/model/model.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ class ZulipStream {
347347
// TODO(server-8): added in FL 199, was previously only on [Subscription] objects
348348
int? streamWeeklyTraffic;
349349

350+
final bool isArchived;
351+
350352
ZulipStream({
351353
required this.streamId,
352354
required this.name,
@@ -360,6 +362,7 @@ class ZulipStream {
360362
required this.messageRetentionDays,
361363
required this.channelPostPolicy,
362364
required this.streamWeeklyTraffic,
365+
required this.isArchived
363366
});
364367

365368
factory ZulipStream.fromJson(Map<String, dynamic> json) =>
@@ -470,6 +473,7 @@ class Subscription extends ZulipStream {
470473
required super.messageRetentionDays,
471474
required super.channelPostPolicy,
472475
required super.streamWeeklyTraffic,
476+
required super.isArchived,
473477
required this.desktopNotifications,
474478
required this.emailNotifications,
475479
required this.wildcardMentionsNotify,

lib/api/model/model.g.dart

Lines changed: 4 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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ ZulipStream stream({
216216
int? messageRetentionDays,
217217
ChannelPostPolicy? channelPostPolicy,
218218
int? streamWeeklyTraffic,
219+
bool? isArchived,
219220
}) {
220221
_checkPositive(streamId, 'stream ID');
221222
_checkPositive(firstMessageId, 'message ID');
@@ -235,6 +236,7 @@ ZulipStream stream({
235236
messageRetentionDays: messageRetentionDays,
236237
channelPostPolicy: channelPostPolicy ?? ChannelPostPolicy.any,
237238
streamWeeklyTraffic: streamWeeklyTraffic,
239+
isArchived: isArchived ?? false
238240
);
239241
}
240242
const _stream = stream;
@@ -273,6 +275,7 @@ Subscription subscription(
273275
messageRetentionDays: stream.messageRetentionDays,
274276
channelPostPolicy: stream.channelPostPolicy,
275277
streamWeeklyTraffic: stream.streamWeeklyTraffic,
278+
isArchived: stream.isArchived,
276279
desktopNotifications: desktopNotifications ?? false,
277280
emailNotifications: emailNotifications ?? false,
278281
wildcardMentionsNotify: wildcardMentionsNotify ?? false,

0 commit comments

Comments
 (0)