aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src/service')
-rw-r--r--libdino/src/service/database.vala4
-rw-r--r--libdino/src/service/message_storage.vala2
2 files changed, 3 insertions, 3 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala
index 91a62cce..51d16e59 100644
--- a/libdino/src/service/database.vala
+++ b/libdino/src/service/database.vala
@@ -201,7 +201,7 @@ public class Database : Qlite.Database {
}
}
- public Gee.List<Message> get_messages(Jid jid, Account account, Message.Type? type, int count, Message? before) {
+ public Gee.List<Message> get_messages(Jid jid, Account account, Message.Type? type, int count, DateTime? before) {
QueryBuilder select = message.select()
.with(message.counterpart_id, "=", get_jid_id(jid))
.with(message.account_id, "=", account.id)
@@ -214,7 +214,7 @@ public class Database : Qlite.Database {
select.with(message.type_, "=", (int) type);
}
if (before != null) {
- select.with(message.time, "<", (long) before.time.to_unix());
+ select.with(message.time, "<", (long) before.to_unix());
}
LinkedList<Message> ret = new LinkedList<Message>();
diff --git a/libdino/src/service/message_storage.vala b/libdino/src/service/message_storage.vala
index 1cde1a95..76a8e60d 100644
--- a/libdino/src/service/message_storage.vala
+++ b/libdino/src/service/message_storage.vala
@@ -47,7 +47,7 @@ public class MessageStorage : StreamInteractionModule, Object {
return null;
}
- public Gee.List<Message>? get_messages_before(Conversation? conversation, Message before, int count = 20) {
+ public Gee.List<Message>? get_messages_before(Conversation? conversation, DateTime before, int count = 20) {
Gee.List<Message> db_messages = db.get_messages(conversation.counterpart, conversation.account, Util.get_message_type_for_conversation(conversation), count, before);
return db_messages;
}