Skip to content

fix: 🐛 Rename updateAt to updatedAt in Message model for consistency#26

Open
japanshah-simform wants to merge 1 commit into
masterfrom
fix/rename-updateat-parameter
Open

fix: 🐛 Rename updateAt to updatedAt in Message model for consistency#26
japanshah-simform wants to merge 1 commit into
masterfrom
fix/rename-updateat-parameter

Conversation

@japanshah-simform
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Renames the Message model’s “last updated” timestamp API from updateAt to updatedAt for consistency, while attempting to preserve backwards compatibility via deprecations.

Changes:

  • Added updatedAt field to Message, with deprecated updateAt getter/constructor/copyWith parameter mapping to updatedAt.
  • Updated Message.fromJson() to read updated_at with fallback to legacy update_at.
  • Added an Unreleased changelog entry describing the rename and JSON behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
lib/src/models/data_models/message.dart Introduces updatedAt and updates JSON parsing/serialization + equality/hash behavior.
CHANGELOG.md Documents the rename under an Unreleased entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 162 to 167
if (includeNullValues) {
data[_replyMessage] = replyMessage.toJson();
data[_reaction] = reaction.toJson();
data[_voiceMessageDuration] = voiceMessageDuration?.inMicroseconds;
data[_updateAt] = updateAt?.toIso8601String();
data[_updatedAt] = updatedAt?.toIso8601String();
data[_update] = update;
Comment thread lib/src/models/data_models/message.dart Outdated
Comment on lines +79 to +81
update: updateData is Map<String, dynamic> ? updateData : null,
updateAt: DateTime.tryParse(json[_updateAt].toString()),
updatedAt: DateTime.tryParse(json[_updatedAt]?.toString() ?? '') ??
DateTime.tryParse(json[_updateAt].toString()),
Comment thread lib/src/models/data_models/message.dart Outdated
'Use updatedAt instead.',
)
DateTime? updateAt,
Map<String, String>? update,
Comment thread CHANGELOG.md
Comment on lines +3 to +4
* **Fix**: [26](https://github.com/SimformSolutionsPvtLtd/chatview_utils/pull/26) Renamed `updateAt` to `updatedAt` in `Message` model for
consistency. The deprecated `updateAt` getter is still available for backward compatibility but will be removed in a future version. `fromJson()` now reads from `updated_at` key and falls back to `update_at` key if not found.
@japanshah-simform japanshah-simform force-pushed the fix/rename-updateat-parameter branch from 2703ff7 to 9cbf9a2 Compare May 19, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants