small fixes
This commit is contained in:
parent
d82194af58
commit
81e05e6645
|
@ -132,7 +132,7 @@ public class Database {
|
||||||
public void exec(string sql) throws Error {
|
public void exec(string sql) throws Error {
|
||||||
ensure_init();
|
ensure_init();
|
||||||
if (db.exec(sql) != OK) {
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,7 @@ public class Module : XmppStreamModule, Iq.Handler {
|
||||||
public signal void unblock_all_received(XmppStream stream);
|
public signal void unblock_all_received(XmppStream stream);
|
||||||
|
|
||||||
public bool is_blocked(XmppStream stream, string jid) {
|
public bool is_blocked(XmppStream stream, string jid) {
|
||||||
foreach (string blocked in stream.get_flag(Flag.IDENTITY).blocklist) {
|
return stream.get_flag(Flag.IDENTITY).blocklist.contains(jid);
|
||||||
if (blocked.contains(jid)) return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool block(XmppStream stream, Gee.List<string> jids) {
|
public bool block(XmppStream stream, Gee.List<string> jids) {
|
||||||
|
|
Loading…
Reference in a new issue