Skip to content

Commit e103c59

Browse files
committed
api [nfc]: Rename streamWeeklyTraffic to channelWeeklyTraffic in Channel
Fixes parts of zulip#631
1 parent 2705e47 commit e103c59

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

lib/api/model/model.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ class Channel {
328328
final int? canRemoveSubscribersGroup;
329329

330330
// TODO(server-8): added in FL 199, was previously only on [Subscription] objects
331-
final int? streamWeeklyTraffic;
331+
final int? channelWeeklyTraffic;
332332

333333
static int? _readCanRemoveSubscribersGroup(Map<dynamic, dynamic> json, String key) {
334334
return (json[key] as int?)
@@ -348,7 +348,7 @@ class Channel {
348348
required this.messageRetentionDays,
349349
required this.channelPostPolicy,
350350
required this.canRemoveSubscribersGroup,
351-
required this.streamWeeklyTraffic,
351+
required this.channelWeeklyTraffic,
352352
});
353353

354354
factory Channel.fromJson(Map<String, dynamic> json) =>
@@ -419,7 +419,7 @@ class Subscription extends Channel {
419419
required super.messageRetentionDays,
420420
required super.channelPostPolicy,
421421
required super.canRemoveSubscribersGroup,
422-
required super.streamWeeklyTraffic,
422+
required super.channelWeeklyTraffic,
423423
required this.desktopNotifications,
424424
required this.emailNotifications,
425425
required this.wildcardMentionsNotify,

lib/api/model/model.g.dart

Lines changed: 4 additions & 4 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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Channel stream({
162162
int? messageRetentionDays,
163163
StreamPostPolicy? channelPostPolicy,
164164
int? canRemoveSubscribersGroup,
165-
int? streamWeeklyTraffic,
165+
int? channelWeeklyTraffic,
166166
}) {
167167
return Channel(
168168
channelId: channelId ?? 123, // TODO generate example IDs
@@ -177,7 +177,7 @@ Channel stream({
177177
messageRetentionDays: messageRetentionDays,
178178
channelPostPolicy: channelPostPolicy ?? StreamPostPolicy.any,
179179
canRemoveSubscribersGroup: canRemoveSubscribersGroup ?? 123,
180-
streamWeeklyTraffic: streamWeeklyTraffic,
180+
channelWeeklyTraffic: channelWeeklyTraffic,
181181
);
182182
}
183183
const _stream = stream;
@@ -210,7 +210,7 @@ Subscription subscription(
210210
messageRetentionDays: stream.messageRetentionDays,
211211
channelPostPolicy: stream.channelPostPolicy,
212212
canRemoveSubscribersGroup: stream.canRemoveSubscribersGroup,
213-
streamWeeklyTraffic: stream.streamWeeklyTraffic,
213+
channelWeeklyTraffic: stream.channelWeeklyTraffic,
214214
desktopNotifications: desktopNotifications ?? false,
215215
emailNotifications: emailNotifications ?? false,
216216
wildcardMentionsNotify: wildcardMentionsNotify ?? false,

0 commit comments

Comments
 (0)