fix: database return NULL if no history limits are found

log_database_get_limits_info should return NULL when a contact has no
history in the database.

We hit a bug with `/msg adsf@asd` before.
This commit is contained in:
Michael Vetter
2026-03-06 14:49:26 +01:00
parent f251cc8bb3
commit 40963c702e

View File

@@ -309,6 +309,9 @@ log_database_get_limits_info(const gchar* const contact_barejid, gboolean is_las
msg->stanzaid = _db_strdup(archive_id);
msg->timestamp = g_date_time_new_from_iso8601(date, NULL);
} else {
message_free(msg);
msg = NULL;
}
sqlite3_finalize(stmt);