aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/chat_input
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-04-04 15:47:00 +0200
committerfiaxh <git@mx.ax.lt>2017-04-04 15:57:35 +0200
commit75e51b5ed3b639b9cf7b16b0ddbee7e362c44ef1 (patch)
treef593528003a5f00268988255904dfc8a6752a779 /main/src/ui/chat_input
parentea5d3e50c6fd63ae3a151c883f691e76b9cb1018 (diff)
downloaddino-75e51b5ed3b639b9cf7b16b0ddbee7e362c44ef1.tar.gz
dino-75e51b5ed3b639b9cf7b16b0ddbee7e362c44ef1.zip
MessageStorage/Processor, correctly resolve conversations (fixup 22adbd3)
Diffstat (limited to 'main/src/ui/chat_input')
-rw-r--r--main/src/ui/chat_input/occupants_tab_completer.vala14
-rw-r--r--main/src/ui/chat_input/view.vala4
2 files changed, 8 insertions, 10 deletions
diff --git a/main/src/ui/chat_input/occupants_tab_completer.vala b/main/src/ui/chat_input/occupants_tab_completer.vala
index 93b0e7ff..9ef73d8b 100644
--- a/main/src/ui/chat_input/occupants_tab_completer.vala
+++ b/main/src/ui/chat_input/occupants_tab_completer.vala
@@ -87,14 +87,12 @@ class OccupantsTabCompletor {
private Gee.List<string> generate_completions_from_messages() {
Gee.List<string> ret = new ArrayList<string>();
- Gee.List<Message>? messages = stream_interactor.get_module(MessageManager.IDENTITY).get_messages(conversation, 10);
- if (messages != null) {
- for (int i = messages.size - 1; i > 0; i--) {
- string resourcepart = messages[i].from.resourcepart;
- string own_nick = stream_interactor.get_module(MucManager.IDENTITY).get_nick(conversation.counterpart, conversation.account);
- if (resourcepart != null && resourcepart != "" && resourcepart != own_nick && !ret.contains(resourcepart)) {
- ret.add(resourcepart);
- }
+ Gee.List<Message> messages = stream_interactor.get_module(MessageStorage.IDENTITY).get_messages(conversation, 10);
+ for (int i = messages.size - 1; i > 0; i--) {
+ string resourcepart = messages[i].from.resourcepart;
+ string own_nick = stream_interactor.get_module(MucManager.IDENTITY).get_nick(conversation.counterpart, conversation.account);
+ if (resourcepart != null && resourcepart != "" && resourcepart != own_nick && !ret.contains(resourcepart)) {
+ ret.add(resourcepart);
}
}
return ret;
diff --git a/main/src/ui/chat_input/view.vala b/main/src/ui/chat_input/view.vala
index 310c0f35..c0acfcfa 100644
--- a/main/src/ui/chat_input/view.vala
+++ b/main/src/ui/chat_input/view.vala
@@ -56,7 +56,7 @@ public class View : Box {
stream_interactor.get_module(MucManager.IDENTITY).kick(conversation.account, conversation.counterpart, token[1]);
break;
case "/me":
- stream_interactor.get_module(MessageManager.IDENTITY).send_message(text, conversation);
+ stream_interactor.get_module(MessageProcessor.IDENTITY).send_message(text, conversation);
break;
case "/nick":
stream_interactor.get_module(MucManager.IDENTITY).change_nick(conversation.account, conversation.counterpart, token[1]);
@@ -66,7 +66,7 @@ public class View : Box {
break;
}
} else {
- stream_interactor.get_module(MessageManager.IDENTITY).send_message(text, conversation);
+ stream_interactor.get_module(MessageProcessor.IDENTITY).send_message(text, conversation);
}
text_input.buffer.text = "";
}