plugins.groupchat: Request zero history

Mon, 08 Nov 2010 23:06:48 +0100

author
Kim Alvefur <zash@zash.se>
date
Mon, 08 Nov 2010 23:06:48 +0100
changeset 36
ccce42f781de
parent 35
0f17e574b6bb
child 37
85b3f2a96edb

plugins.groupchat: Request zero history

plugins/groupchat.lua file | annotate | diff | comparison | revisions
--- a/plugins/groupchat.lua	Mon Nov 08 22:41:24 2010 +0100
+++ b/plugins/groupchat.lua	Mon Nov 08 23:06:48 2010 +0100
@@ -5,6 +5,7 @@
 room_mt.__index = room_mt;
 
 local xmlns_delay = "urn:xmpp:delay";
+local xmlns_muc = "http://jabber.org/protocol/muc";
 
 function riddim.plugins.groupchat(bot)
 	bot.rooms = {};
@@ -90,7 +91,8 @@
 				occupants[nick] = nil;
 			end
 		end);
-		self:send(st.presence({to = jid.."/"..nick}));
+		self:send(st.presence({to = jid.."/"..nick})
+			:tag("x",{xmlns = xmlns_muc}):tag("history",{maxstanzas = 0}));
 		self:event("groupchat/joining", room);
 		return room;
 	end

mercurial