Software / code / verse
Comparison
plugins/groupchat.lua @ 207:78f59d7b1ef7
plugins.groupchat: Bump topic change handling up a bit
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 20 Mar 2011 19:00:26 +0100 |
| parent | 197:7e98cf2c1d8d |
| child | 215:f86e0b0a0be3 |
comparison
equal
deleted
inserted
replaced
| 206:1bf01ffcb5a3 | 207:78f59d7b1ef7 |
|---|---|
| 96 local subject = msg.stanza:get_child("subject"); | 96 local subject = msg.stanza:get_child("subject"); |
| 97 subject = subject and subject:get_text(); | 97 subject = subject and subject:get_text(); |
| 98 if subject then | 98 if subject then |
| 99 room.subject = #subject > 0 and subject or nil; | 99 room.subject = #subject > 0 and subject or nil; |
| 100 end | 100 end |
| 101 end); | 101 end, 2000); |
| 102 local join_st = verse.presence():tag("x",{xmlns = xmlns_muc}):reset(); | 102 local join_st = verse.presence():tag("x",{xmlns = xmlns_muc}):reset(); |
| 103 self:event("pre-groupchat/joining", join_st); | 103 self:event("pre-groupchat/joining", join_st); |
| 104 room:send(join_st) | 104 room:send(join_st) |
| 105 self:event("groupchat/joining", room); | 105 self:event("groupchat/joining", room); |
| 106 return room; | 106 return room; |