diff --git a/extensions/messages/src/Dialog.php b/extensions/messages/src/Dialog.php index c8b95c82a6..7e15315d97 100644 --- a/extensions/messages/src/Dialog.php +++ b/extensions/messages/src/Dialog.php @@ -42,6 +42,10 @@ class Dialog extends AbstractModel protected $table = 'dialogs'; + protected $casts = [ + 'last_message_at' => 'datetime' + ]; + public $timestamps = true; public static array $types = ['direct']; diff --git a/extensions/messages/src/UserDialogState.php b/extensions/messages/src/UserDialogState.php index b684ab788f..d5016146f0 100644 --- a/extensions/messages/src/UserDialogState.php +++ b/extensions/messages/src/UserDialogState.php @@ -36,6 +36,7 @@ class UserDialogState extends AbstractModel 'user_id' => 'integer', 'dialog_id' => 'integer', 'joined_at' => 'datetime', + 'last_read_at' => 'datetime', 'last_read_message_id' => 'integer' ];