Software /
code /
verse
Diff
plugins/groupchat.lua @ 251:e44ddcd84234
fixed sending of leave message
author | mva <mva@mva.name> |
---|---|
date | Fri, 02 Dec 2011 11:27:38 +0600 |
parent | 250:a5ac643a7fd6 |
child | 252:7b36e4038377 |
line wrap: on
line diff
--- a/plugins/groupchat.lua Fri Dec 02 11:02:02 2011 +0600 +++ b/plugins/groupchat.lua Fri Dec 02 11:27:38 2011 +0600 @@ -145,8 +145,14 @@ end function room_mt:leave(message) + local presence = nil; self.stream:event("groupchat/leaving", self); - self:send(verse.presence({type="unavailable"})); + if message then + presence = verse.presence({type="unavailable"}):tag("status"):text(message); + else + presence = verse.presence({type="unavailable"}); + end + self:send(presence); end function room_mt:admin_set(nick, what, value, reason)