Skip to content

Commit 1964388

Browse files
Khader-1gnprice
authored andcommitted
api [nfc]: Rename references of ChannelPostPolicy to match new name
1 parent 5098245 commit 1964388

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

lib/api/model/model.dart

+5-5
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,9 @@ class ZulipStream {
320320
final bool isWebPublic; // present since 2.1, according to /api/changelog
321321
final bool historyPublicToSubscribers;
322322
final int? messageRetentionDays;
323-
324-
final ChannelPostPolicy streamPostPolicy;
325-
// final bool isAnnouncementOnly; // deprecated for `streamPostPolicy`; ignore
323+
@JsonKey(name: 'stream_post_policy')
324+
final ChannelPostPolicy channelPostPolicy;
325+
// final bool isAnnouncementOnly; // deprecated for `channelPostPolicy`; ignore
326326

327327
// TODO(server-6): `canRemoveSubscribersGroupId` added in FL 142
328328
// TODO(server-8): in FL 197 renamed to `canRemoveSubscribersGroup`
@@ -348,7 +348,7 @@ class ZulipStream {
348348
required this.isWebPublic,
349349
required this.historyPublicToSubscribers,
350350
required this.messageRetentionDays,
351-
required this.streamPostPolicy,
351+
required this.channelPostPolicy,
352352
required this.canRemoveSubscribersGroup,
353353
required this.streamWeeklyTraffic,
354354
});
@@ -419,7 +419,7 @@ class Subscription extends ZulipStream {
419419
required super.isWebPublic,
420420
required super.historyPublicToSubscribers,
421421
required super.messageRetentionDays,
422-
required super.streamPostPolicy,
422+
required super.channelPostPolicy,
423423
required super.canRemoveSubscribersGroup,
424424
required super.streamWeeklyTraffic,
425425
required this.desktopNotifications,

lib/api/model/model.g.dart

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/example_data.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ ZulipStream stream({
171171
bool? isWebPublic,
172172
bool? historyPublicToSubscribers,
173173
int? messageRetentionDays,
174-
ChannelPostPolicy? streamPostPolicy,
174+
ChannelPostPolicy? channelPostPolicy,
175175
int? canRemoveSubscribersGroup,
176176
int? streamWeeklyTraffic,
177177
}) {
@@ -186,7 +186,7 @@ ZulipStream stream({
186186
isWebPublic: isWebPublic ?? false,
187187
historyPublicToSubscribers: historyPublicToSubscribers ?? true,
188188
messageRetentionDays: messageRetentionDays,
189-
streamPostPolicy: streamPostPolicy ?? ChannelPostPolicy.any,
189+
channelPostPolicy: channelPostPolicy ?? ChannelPostPolicy.any,
190190
canRemoveSubscribersGroup: canRemoveSubscribersGroup ?? 123,
191191
streamWeeklyTraffic: streamWeeklyTraffic,
192192
);
@@ -219,7 +219,7 @@ Subscription subscription(
219219
isWebPublic: stream.isWebPublic,
220220
historyPublicToSubscribers: stream.historyPublicToSubscribers,
221221
messageRetentionDays: stream.messageRetentionDays,
222-
streamPostPolicy: stream.streamPostPolicy,
222+
channelPostPolicy: stream.channelPostPolicy,
223223
canRemoveSubscribersGroup: stream.canRemoveSubscribersGroup,
224224
streamWeeklyTraffic: stream.streamWeeklyTraffic,
225225
desktopNotifications: desktopNotifications ?? false,

0 commit comments

Comments
 (0)