diff options
Diffstat (limited to 'libdino/src/service/database.vala')
-rw-r--r-- | libdino/src/service/database.vala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala index 797fd6c9..a74ac056 100644 --- a/libdino/src/service/database.vala +++ b/libdino/src/service/database.vala @@ -190,7 +190,10 @@ public class Database : Qlite.Database { public Gee.List<Message> get_unsend_messages(Account account) { Gee.List<Message> ret = new ArrayList<Message>(); - foreach (Row row in message.select().with(message.marked, "=", (int) Message.Marked.UNSENT)) { + var select = message.select() + .with(message.account_id, "=", account.id) + .with(message.marked, "=", (int) Message.Marked.UNSENT); + foreach (Row row in select) { ret.add(new Message.from_row(this, row)); } return ret; |