Skip to content

Commit 4ae44a6

Browse files
committed
model [nfc]: Add comment about making certain fields final in ZulipStream
1 parent 93ce9c5 commit 4ae44a6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/api/model/model.dart

+8
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,14 @@ enum UserRole{
308308
/// in <https://zulip.com/api/register-queue>.
309309
@JsonSerializable(fieldRename: FieldRename.snake)
310310
class ZulipStream {
311+
// When adding a field to this class:
312+
// * If a [ChannelUpdateEvent] can update it, be sure to add
313+
// that case as a field of [ChannelUpdateEvent] or as a new value to
314+
// [ChannelPropertyName] enum; based on what the stream-update API suggests.
315+
// * If the field can never change for a given Zulip stream, mark it final.
316+
// * (If it can change but [ChannelUpdateEvent] doesn't cover that,
317+
// then that's a bug in the API; raise it in `#api design`.)
318+
311319
final int streamId;
312320
String name;
313321
String description;

0 commit comments

Comments
 (0)