aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/chat_input_controller.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2019-12-22 04:10:53 +0100
committerMarvin W <git@larma.de>2019-12-23 16:58:53 +0100
commita0a956ee0878d24bd06be7f5d75dc4ccd4e7901d (patch)
treecbb079649066c2001b6d6881137108e70eed9d3f /main/src/ui/chat_input_controller.vala
parent3218dc0211ac717230fe03fad82681a626d968b5 (diff)
downloaddino-a0a956ee0878d24bd06be7f5d75dc4ccd4e7901d.tar.gz
dino-a0a956ee0878d24bd06be7f5d75dc4ccd4e7901d.zip
Properly check Jids everywhere
Diffstat (limited to 'main/src/ui/chat_input_controller.vala')
-rw-r--r--main/src/ui/chat_input_controller.vala6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/src/ui/chat_input_controller.vala b/main/src/ui/chat_input_controller.vala
index c386f55e..aafb40a3 100644
--- a/main/src/ui/chat_input_controller.vala
+++ b/main/src/ui/chat_input_controller.vala
@@ -108,7 +108,11 @@ public class ChatInputController : Object {
return;
case "/ping":
Xmpp.XmppStream? stream = stream_interactor.get_stream(conversation.account);
- stream.get_module(Xmpp.Xep.Ping.Module.IDENTITY).send_ping(stream, conversation.counterpart.with_resource(token[1]), null);
+ try {
+ stream.get_module(Xmpp.Xep.Ping.Module.IDENTITY).send_ping(stream, conversation.counterpart.with_resource(token[1]), null);
+ } catch (Xmpp.InvalidJidError e) {
+ warning("Could not ping invalid Jid: %s", e.message);
+ }
return;
case "/topic":
stream_interactor.get_module(MucManager.IDENTITY).change_subject(conversation.account, conversation.counterpart, token[1]);