File tree 4 files changed +15
-15
lines changed 4 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -320,7 +320,7 @@ class Channel {
320
320
final bool historyPublicToSubscribers;
321
321
final int ? messageRetentionDays;
322
322
@JsonKey (name: 'stream_post_policy' )
323
- final StreamPostPolicy channelPostPolicy;
323
+ final ChannelPostPolicy channelPostPolicy;
324
324
// final bool isAnnouncementOnly; // deprecated for `channelPostPolicy`; ignore
325
325
326
326
// TODO(server-6): `canRemoveSubscribersGroupId` added in FL 142
@@ -359,19 +359,19 @@ class Channel {
359
359
Map <String , dynamic > toJson () => _$ChannelToJson (this );
360
360
}
361
361
362
- /// Policy for which users can post to the stream .
362
+ /// Policy for which users can post to the channel .
363
363
///
364
364
/// For docs, search for "stream_post_policy"
365
365
/// in <https://zulip.com/api/get-stream-by-id>
366
366
@JsonEnum (valueField: 'apiValue' )
367
- enum StreamPostPolicy {
367
+ enum ChannelPostPolicy {
368
368
any (apiValue: 1 ),
369
369
administrators (apiValue: 2 ),
370
370
fullMembers (apiValue: 3 ),
371
371
moderators (apiValue: 4 ),
372
372
unknown (apiValue: null );
373
373
374
- const StreamPostPolicy ({
374
+ const ChannelPostPolicy ({
375
375
required this .apiValue,
376
376
});
377
377
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ void main() {
78
78
'is_web_public' : false ,
79
79
'history_public_to_subscribers' : true ,
80
80
'message_retention_days' : null ,
81
- 'stream_post_policy' : StreamPostPolicy .any.apiValue,
81
+ 'stream_post_policy' : ChannelPostPolicy .any.apiValue,
82
82
// 'can_remove_subscribers_group': null,
83
83
'stream_weekly_traffic' : null ,
84
84
});
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ Channel stream({
160
160
bool ? isWebPublic,
161
161
bool ? historyPublicToSubscribers,
162
162
int ? messageRetentionDays,
163
- StreamPostPolicy ? channelPostPolicy,
163
+ ChannelPostPolicy ? channelPostPolicy,
164
164
int ? canRemoveSubscribersGroup,
165
165
int ? channelWeeklyTraffic,
166
166
}) {
@@ -175,7 +175,7 @@ Channel stream({
175
175
isWebPublic: isWebPublic ?? false ,
176
176
historyPublicToSubscribers: historyPublicToSubscribers ?? true ,
177
177
messageRetentionDays: messageRetentionDays,
178
- channelPostPolicy: channelPostPolicy ?? StreamPostPolicy .any,
178
+ channelPostPolicy: channelPostPolicy ?? ChannelPostPolicy .any,
179
179
canRemoveSubscribersGroup: canRemoveSubscribersGroup ?? 123 ,
180
180
channelWeeklyTraffic: channelWeeklyTraffic,
181
181
);
You can’t perform that action at this time.
0 commit comments