aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/message_manager.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-03-24 00:15:00 +0100
committerfiaxh <git@mx.ax.lt>2017-03-24 00:24:33 +0100
commitc0314212a0d951494fe6397fa53a9c5689a3ff87 (patch)
treeb97793573e7729208bbaa1b7376842de7e6b8cec /libdino/src/service/message_manager.vala
parent5862e253377a5d6259dfa6a8cc0731f2f7028830 (diff)
downloaddino-c0314212a0d951494fe6397fa53a9c5689a3ff87.tar.gz
dino-c0314212a0d951494fe6397fa53a9c5689a3ff87.zip
Tab completion for MUC occupants
Diffstat (limited to 'libdino/src/service/message_manager.vala')
-rw-r--r--libdino/src/service/message_manager.vala6
1 files changed, 3 insertions, 3 deletions
diff --git a/libdino/src/service/message_manager.vala b/libdino/src/service/message_manager.vala
index c2d1021e..1f0d528b 100644
--- a/libdino/src/service/message_manager.vala
+++ b/libdino/src/service/message_manager.vala
@@ -41,13 +41,13 @@ public class MessageManager : StreamInteractionModule, Object {
message_sent(message, conversation);
}
- public Gee.List<Entities.Message>? get_messages(Conversation conversation) {
+ public Gee.List<Entities.Message>? get_messages(Conversation conversation, int count = 50) {
if (messages.has_key(conversation) && messages[conversation].size > 0) {
- Gee.List<Entities.Message> db_messages = db.get_messages(conversation.counterpart, conversation.account, 50, messages[conversation][0]);
+ Gee.List<Entities.Message> db_messages = db.get_messages(conversation.counterpart, conversation.account, count, messages[conversation][0]);
db_messages.add_all(messages[conversation]);
return db_messages;
} else {
- Gee.List<Entities.Message> db_messages = db.get_messages(conversation.counterpart, conversation.account, 50, null);
+ Gee.List<Entities.Message> db_messages = db.get_messages(conversation.counterpart, conversation.account, count, null);
return db_messages;
}
}