plugins/disco.lua

changeset 267
d30897e4f5c2
parent 266
ad8a918fa6e6
child 380
0891b4e27766
equal deleted inserted replaced
266:ad8a918fa6e6 267:d30897e4f5c2
117 ver = hash 117 ver = hash
118 }) 118 })
119 end 119 end
120 }) 120 })
121 121
122 function stream:set_identity(identity, node)
123 self.disco.info[node or false].identities = { identity };
124 stream:resend_presence();
125 end
126
127 function stream:add_identity(identity, node)
128 local identities = self.disco.info[node or false].identities;
129 identities[#identities + 1] = identity;
130 stream:resend_presence();
131 end
132
122 function stream:add_disco_feature(feature, node) 133 function stream:add_disco_feature(feature, node)
123 local feature = feature.var or feature; 134 local feature = feature.var or feature;
124 self.disco.info[node or false].features[feature] = true; 135 self.disco.info[node or false].features[feature] = true;
125 stream:resend_presence(); 136 stream:resend_presence();
126 end 137 end

mercurial