Comparison

plugins/muc/muc.lib.lua @ 10212:a53126b7fe22

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Wed, 21 Aug 2019 00:36:42 +0200
parent 10048:e5532fbdd163
parent 10211:224e681c4db2
child 10294:b61a7173f838
comparison
equal deleted inserted replaced
10210:9fdda9fafc3c 10212:a53126b7fe22
357 return reply; 357 return reply;
358 end 358 end
359 module:hook("muc-disco#info", function(event) 359 module:hook("muc-disco#info", function(event)
360 event.reply:tag("feature", {var = "http://jabber.org/protocol/muc"}):up(); 360 event.reply:tag("feature", {var = "http://jabber.org/protocol/muc"}):up();
361 event.reply:tag("feature", {var = "http://jabber.org/protocol/muc#stable_id"}):up(); 361 event.reply:tag("feature", {var = "http://jabber.org/protocol/muc#stable_id"}):up();
362 event.reply:tag("feature", {var = "http://jabber.org/protocol/muc#self-ping-optimization"}):up();
362 end); 363 end);
363 module:hook("muc-disco#info", function(event) 364 module:hook("muc-disco#info", function(event)
364 table.insert(event.form, { name = "muc#roominfo_occupants", label = "Number of occupants" }); 365 table.insert(event.form, { name = "muc#roominfo_occupants", label = "Number of occupants" });
365 event.formdata["muc#roominfo_occupants"] = tostring(iterators.count(event.room:each_occupant())); 366 event.formdata["muc#roominfo_occupants"] = tostring(iterators.count(event.room:each_occupant()));
366 end); 367 end);