diff options
-rw-r--r-- | qlite/src/database.vala | 2 | ||||
-rw-r--r-- | xmpp-vala/src/module/xep/0191_blocking_command.vala | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/qlite/src/database.vala b/qlite/src/database.vala index b153be73..37a7b7f7 100644 --- a/qlite/src/database.vala +++ b/qlite/src/database.vala @@ -132,7 +132,7 @@ public class Database { public void exec(string sql) throws Error { ensure_init(); if (db.exec(sql) != OK) { - throw new Error(-1, 0, @"SQLite error: $(db.errcode()) - $(db.errmsg())"); + throw new Error(-1, 0, "SQLite error: %d - %s", db.errcode(), db.errmsg()); } } diff --git a/xmpp-vala/src/module/xep/0191_blocking_command.vala b/xmpp-vala/src/module/xep/0191_blocking_command.vala index 53d7bb7b..1520577f 100644 --- a/xmpp-vala/src/module/xep/0191_blocking_command.vala +++ b/xmpp-vala/src/module/xep/0191_blocking_command.vala @@ -14,10 +14,7 @@ public class Module : XmppStreamModule, Iq.Handler { public signal void unblock_all_received(XmppStream stream); public bool is_blocked(XmppStream stream, string jid) { - foreach (string blocked in stream.get_flag(Flag.IDENTITY).blocklist) { - if (blocked.contains(jid)) return true; - } - return false; + return stream.get_flag(Flag.IDENTITY).blocklist.contains(jid); } public bool block(XmppStream stream, Gee.List<string> jids) { |