Skip to content

Commit

Permalink
model [nfc]: Add comment about making certain fields final in `Zuli…
Browse files Browse the repository at this point in the history
…pStream`
  • Loading branch information
sm-sayedi committed Aug 12, 2024
1 parent 93ce9c5 commit 4ae44a6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/api/model/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,14 @@ enum UserRole{
/// in <https://zulip.com/api/register-queue>.
@JsonSerializable(fieldRename: FieldRename.snake)
class ZulipStream {
// When adding a field to this class:
// * If a [ChannelUpdateEvent] can update it, be sure to add
// that case as a field of [ChannelUpdateEvent] or as a new value to
// [ChannelPropertyName] enum; based on what the stream-update API suggests.
// * If the field can never change for a given Zulip stream, mark it final.
// * (If it can change but [ChannelUpdateEvent] doesn't cover that,
// then that's a bug in the API; raise it in `#api design`.)

final int streamId;
String name;
String description;
Expand Down

0 comments on commit 4ae44a6

Please sign in to comment.