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? get_messages(Conversation conversation) { + public Gee.List? get_messages(Conversation conversation, int count = 50) { if (messages.has_key(conversation) && messages[conversation].size > 0) { - Gee.List db_messages = db.get_messages(conversation.counterpart, conversation.account, 50, messages[conversation][0]); + Gee.List 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 db_messages = db.get_messages(conversation.counterpart, conversation.account, 50, null); + Gee.List db_messages = db.get_messages(conversation.counterpart, conversation.account, count, null); return db_messages; } } diff --git a/libdino/src/service/muc_manager.vala b/libdino/src/service/muc_manager.vala index f8520064..82d200b0 100644 --- a/libdino/src/service/muc_manager.vala +++ b/libdino/src/service/muc_manager.vala @@ -53,7 +53,10 @@ public class MucManager : StreamInteractionModule, Object { } public ArrayList? get_occupants(Jid jid, Account account) { - return stream_interactor.get_module(PresenceManager.IDENTITY).get_full_jids(jid, account); + if (is_groupchat(jid, account)) { + return stream_interactor.get_module(PresenceManager.IDENTITY).get_full_jids(jid, account); + } + return null; } public ArrayList? get_other_occupants(Jid jid, Account account) { diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 60d91c7b..ace08960 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -68,7 +68,9 @@ SOURCES src/ui/add_conversation/list_row.vala src/ui/add_conversation/select_jid_fragment.vala src/ui/avatar_generator.vala - src/ui/chat_input.vala + src/ui/chat_input/occupants_tab_completer.vala + src/ui/chat_input/smiley_converter.vala + src/ui/chat_input/view.vala src/ui/conversation_list_titlebar.vala src/ui/conversation_selector/chat_row.vala src/ui/conversation_selector/conversation_row.vala diff --git a/main/data/chat_input.ui b/main/data/chat_input.ui index f8a1c2f7..2436ff82 100644 --- a/main/data/chat_input.ui +++ b/main/data/chat_input.ui @@ -1,7 +1,7 @@ -