git » sdk » commit d40f2ee

Don't set if it is null anyway

author Stephen Paul Weber
2026-02-04 19:00:53 UTC
committer Stephen Paul Weber
2026-02-04 19:00:53 UTC
parent 379f72494edd1ea9970e92cb6cd931f9b464de12

Don't set if it is null anyway

borogove/Client.hx +1 -1

diff --git a/borogove/Client.hx b/borogove/Client.hx
index b9c6e0a..8df29d8 100644
--- a/borogove/Client.hx
+++ b/borogove/Client.hx
@@ -853,7 +853,7 @@ class Client extends EventEmitter {
 					for (detail in details) {
 						var chat = getChat(detail.chatId) ?? getDirectChat(detail.chatId, false);
 						final initialLastId = chat.lastMessageId();
-						chat.setLastMessage(detail.message);
+						if (detail.message != null) chat.setLastMessage(detail.message);
 						chat.setUnreadCount(detail.unreadCount);
 						if (detail.unreadCount > 0 && initialLastId != chat.lastMessageId()) {
 							chatActivity(chat, false);