aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0060_pubsub.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-03-12 21:20:56 +0100
committerMarvin W <git@larma.de>2017-03-12 21:24:47 +0100
commitbd1f116b3a57b803e2be4dc92474937f1f824fe4 (patch)
tree908c8eb00b762c10cfa920ca89de9d834b50bc0a /xmpp-vala/src/module/xep/0060_pubsub.vala
parent13cef27d46bb8c3c6a274983fc8569752fb69b5d (diff)
downloaddino-bd1f116b3a57b803e2be4dc92474937f1f824fe4.tar.gz
dino-bd1f116b3a57b803e2be4dc92474937f1f824fe4.zip
Fix delegate copying issue
Diffstat (limited to 'xmpp-vala/src/module/xep/0060_pubsub.vala')
-rw-r--r--xmpp-vala/src/module/xep/0060_pubsub.vala7
1 files changed, 4 insertions, 3 deletions
diff --git a/xmpp-vala/src/module/xep/0060_pubsub.vala b/xmpp-vala/src/module/xep/0060_pubsub.vala
index 2c06843e..9c2f4ebf 100644
--- a/xmpp-vala/src/module/xep/0060_pubsub.vala
+++ b/xmpp-vala/src/module/xep/0060_pubsub.vala
@@ -60,7 +60,7 @@ namespace Xmpp.Xep.Pubsub {
string node = items_node.get_attribute("node", NS_URI_EVENT);
string id = item_node.get_attribute("id", NS_URI_EVENT);
if (event_listeners.has_key(node)) {
- event_listeners[node].on_result(stream, message.from, id, item_node.sub_nodes[0]);
+ event_listeners[node].on_result(stream, message.from, id, item_node.sub_nodes[0], event_listeners[node].reference);
}
}
@@ -76,9 +76,10 @@ namespace Xmpp.Xep.Pubsub {
}
public class EventListenerDelegate {
- public delegate void ResultFunc(XmppStream stream, string jid, string id, StanzaNode node);
+ [CCode (has_target = false)]
+ public delegate void ResultFunc(XmppStream stream, string jid, string id, StanzaNode node, Object? object);
public ResultFunc on_result { get; private set; }
- private Object reference;
+ public Object? reference { get; private set; }
public EventListenerDelegate(ResultFunc on_result, Object? reference = null) {
this.on_result = on_result;