Skip to content

Commit d7d08e2

Browse files
committed
api: Remove sender_id fallback for UnreadDmSnapshot.otherUserId, relying on server 5+, FL 119+
See "Feature level 119" from Zulip API changelog: https://zulip.com/api/changelog See also: https://chat.zulip.org/#narrow/stream/412-api-documentation/topic/register.3A.20When.20was.20.60unread_msgs.2Epms.5B.5D.2Eother_user_id.60.20added.3F Signed-off-by: Zixuan James Li <[email protected]>
1 parent 6fb301a commit d7d08e2

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

lib/api/model/initial_snapshot.dart

-6
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,9 @@ class UnreadMessagesSnapshot {
272272
/// An item in [UnreadMessagesSnapshot.dms].
273273
@JsonSerializable(fieldRename: FieldRename.snake)
274274
class UnreadDmSnapshot {
275-
@JsonKey(readValue: _readOtherUserId)
276275
final int otherUserId;
277276
final List<int> unreadMessageIds;
278277

279-
// TODO(server-5): Simplify away.
280-
static dynamic _readOtherUserId(Map<dynamic, dynamic> json, String key) {
281-
return json[key] ?? json['sender_id'];
282-
}
283-
284278
UnreadDmSnapshot({
285279
required this.otherUserId,
286280
required this.unreadMessageIds,

lib/api/model/initial_snapshot.g.dart

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

0 commit comments

Comments
 (0)