Fri, 16 Dec 2011 22:01:29 +0100
plugins.disco: Add set_ and add_identity()
plugins/disco.lua | file | annotate | diff | comparison | revisions |
--- a/plugins/disco.lua Fri Dec 16 22:00:41 2011 +0100 +++ b/plugins/disco.lua Fri Dec 16 22:01:29 2011 +0100 @@ -119,6 +119,17 @@ end }) + function stream:set_identity(identity, node) + self.disco.info[node or false].identities = { identity }; + stream:resend_presence(); + end + + function stream:add_identity(identity, node) + local identities = self.disco.info[node or false].identities; + identities[#identities + 1] = identity; + stream:resend_presence(); + end + function stream:add_disco_feature(feature, node) local feature = feature.var or feature; self.disco.info[node or false].features[feature] = true;