diff options
author | Marvin W <git@larma.de> | 2019-12-22 04:10:53 +0100 |
---|---|---|
committer | Marvin W <git@larma.de> | 2019-12-23 16:58:53 +0100 |
commit | a0a956ee0878d24bd06be7f5d75dc4ccd4e7901d (patch) | |
tree | cbb079649066c2001b6d6881137108e70eed9d3f /libdino/src/service/muc_manager.vala | |
parent | 3218dc0211ac717230fe03fad82681a626d968b5 (diff) | |
download | dino-a0a956ee0878d24bd06be7f5d75dc4ccd4e7901d.tar.gz dino-a0a956ee0878d24bd06be7f5d75dc4ccd4e7901d.zip |
Properly check Jids everywhere
Diffstat (limited to 'libdino/src/service/muc_manager.vala')
-rw-r--r-- | libdino/src/service/muc_manager.vala | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libdino/src/service/muc_manager.vala b/libdino/src/service/muc_manager.vala index 01185731..018f78b3 100644 --- a/libdino/src/service/muc_manager.vala +++ b/libdino/src/service/muc_manager.vala @@ -239,10 +239,14 @@ public class MucManager : StreamInteractionModule, Object { } public Jid? get_own_jid(Jid muc_jid, Account account) { - Xep.Muc.Flag? flag = get_muc_flag(account); - if (flag != null) { - string? nick = flag.get_muc_nick(muc_jid); - if (nick != null) return muc_jid.with_resource(nick); + try { + Xep.Muc.Flag? flag = get_muc_flag(account); + if (flag != null) { + string? nick = flag.get_muc_nick(muc_jid); + if (nick != null) return muc_jid.with_resource(nick); + } + } catch (InvalidJidError e) { + warning("Joined MUC with invalid Jid: %s", e.message); } return null; } |