Comparison

plugins/muc/muc.lib.lua @ 10211:224e681c4db2 0.11

MUC: Advertise XEP-0410 support Unsure if the feature was in the XEP at the time of 7c1cdf5f9f83
author Kim Alvefur <zash@zash.se>
date Tue, 30 Jul 2019 08:01:22 +0200
parent 9819:11671a2e07a9
child 10212:a53126b7fe22
child 10293:f9301d93de72
comparison
equal deleted inserted replaced
10092:4b3c129e96f2 10211:224e681c4db2
356 return reply; 356 return reply;
357 end 357 end
358 module:hook("muc-disco#info", function(event) 358 module:hook("muc-disco#info", function(event)
359 event.reply:tag("feature", {var = "http://jabber.org/protocol/muc"}):up(); 359 event.reply:tag("feature", {var = "http://jabber.org/protocol/muc"}):up();
360 event.reply:tag("feature", {var = "http://jabber.org/protocol/muc#stable_id"}):up(); 360 event.reply:tag("feature", {var = "http://jabber.org/protocol/muc#stable_id"}):up();
361 event.reply:tag("feature", {var = "http://jabber.org/protocol/muc#self-ping-optimization"}):up();
361 end); 362 end);
362 module:hook("muc-disco#info", function(event) 363 module:hook("muc-disco#info", function(event)
363 table.insert(event.form, { name = "muc#roominfo_occupants", label = "Number of occupants" }); 364 table.insert(event.form, { name = "muc#roominfo_occupants", label = "Number of occupants" });
364 event.formdata["muc#roominfo_occupants"] = tostring(iterators.count(event.room:each_occupant())); 365 event.formdata["muc#roominfo_occupants"] = tostring(iterators.count(event.room:each_occupant()));
365 end); 366 end);