fix: CRITICAL log on check_notifications

This commit is contained in:
Evangelos Paterakis 2023-01-09 02:56:27 +02:00
parent 0c3ed85fba
commit 47f53a2775
No known key found for this signature in database
GPG Key ID: FE5185F095BFC8C9
1 changed files with 1 additions and 0 deletions

View File

@ -204,6 +204,7 @@ public class Tooth.InstanceAccount : API.Account, Streamable {
.with_account (this)
.then ((sess, msg) => {
var root = network.parse (msg);
if (!root.has_member("notifications")) return;
var notifications = root.get_object_member ("notifications");
last_read_id = int.parse (notifications.get_string_member_with_default ("last_read_id", "-1") );
if (!passed_init_notifications) init_notifications();