plugins/disco.lua

changeset 113
769366a8b238
parent 112
4f8429727316
child 115
9f8cacfca7c7
equal deleted inserted replaced
112:4f8429727316 113:769366a8b238
86 end 86 end
87 }) 87 })
88 88
89 function stream:add_disco_feature(feature) 89 function stream:add_disco_feature(feature)
90 table.insert(self.disco.info.features, {var=feature}); 90 table.insert(self.disco.info.features, {var=feature});
91 end
92
93 function stream:remove_disco_feature(feature)
94 for idx, disco_feature in ipairs(self.disco.info.features) do
95 if disco_feature.var == feature then
96 table.remove(self.disco.info.features, idx);
97 return true;
98 end
99 end
91 end 100 end
92 101
93 function stream:jid_has_identity(jid, category, type) 102 function stream:jid_has_identity(jid, category, type)
94 local cached_disco = self.disco.cache[jid]; 103 local cached_disco = self.disco.cache[jid];
95 if not cached_disco then 104 if not cached_disco then

mercurial