# HG changeset patch # User Kim Alvefur # Date 1294874597 -3600 # Node ID 8173e57522bf9849e76d1cc57fd1cc69d9676576 # Parent 817981c61affcd3117f0622ada07971dc0d8b310 plugins.groupchat: Fix a missing `st.` and send join stanza regardless of return value from pre-join event. diff -r 817981c61aff -r 8173e57522bf plugins/groupchat.lua --- a/plugins/groupchat.lua Tue Jan 11 23:18:40 2011 +0100 +++ b/plugins/groupchat.lua Thu Jan 13 00:23:17 2011 +0100 @@ -84,14 +84,11 @@ room.subject = subject and subject:get_text() or ""; end end); - local join_st = presence({to = jid.."/"..nick}) + local join_st = st.presence({to = jid.."/"..nick}) :tag("x",{xmlns = xmlns_muc}):reset(); - -- Is this a good API for adding stuff etc? - local ok, err = self:event("pre-groupchat/joining", join_st); - if ok then - self:send(join_st) - self:event("groupchat/joining", room); - end + self:event("pre-groupchat/joining", join_st); + self:send(join_st) + self:event("groupchat/joining", room); return room; end