aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-03-13 18:40:45 +0100
committerfiaxh <git@lightrise.org>2019-03-14 17:39:31 +0100
commitfb504308d03e078422422b57323f89ae86dac466 (patch)
tree31b493611b62ca05965390a29e0f4e22a6a3c37f /xmpp-vala/src/module/xep
parentdf6328dfcb9031092ae2f1ba1ef18da600605338 (diff)
downloaddino-fb504308d03e078422422b57323f89ae86dac466.tar.gz
dino-fb504308d03e078422422b57323f89ae86dac466.zip
Entity capabilities: Check c node for ver attribute
fixes #530
Diffstat (limited to 'xmpp-vala/src/module/xep')
-rw-r--r--xmpp-vala/src/module/xep/0115_entitiy_capabilities.vala3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmpp-vala/src/module/xep/0115_entitiy_capabilities.vala b/xmpp-vala/src/module/xep/0115_entitiy_capabilities.vala
index 19b0be3e..75b87e38 100644
--- a/xmpp-vala/src/module/xep/0115_entitiy_capabilities.vala
+++ b/xmpp-vala/src/module/xep/0115_entitiy_capabilities.vala
@@ -46,7 +46,8 @@ namespace Xmpp.Xep.EntityCapabilities {
private void on_received_presence(XmppStream stream, Presence.Stanza presence) {
StanzaNode? c_node = presence.stanza.get_subnode("c", NS_URI);
if (c_node != null) {
- string ver_attribute = c_node.get_attribute("ver", NS_URI);
+ string? ver_attribute = c_node.get_attribute("ver", NS_URI);
+ if (ver_attribute == null) return;
Gee.List<string> capabilities = storage.get_features(ver_attribute);
if (capabilities.size == 0) {
stream.get_module(ServiceDiscovery.Module.IDENTITY).request_info(stream, presence.from, (stream, query_result) => {