Software /
code /
verse
Changeset
184:8173e57522bf
plugins.groupchat: Fix a missing `st.` and send join stanza regardless of return value from pre-join event.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 13 Jan 2011 00:23:17 +0100 |
parents | 183:817981c61aff |
children | 185:4f897d0e01c4 |
files | plugins/groupchat.lua |
diffstat | 1 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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