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 |