Mercurial > prosody-hg
comparison plugins/muc/subject.lib.lua @ 8606:b6b1f0f9b381
MUC: Use empty string if no subject provided (thanks pep+)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 16 Mar 2018 17:36:49 +0000 |
| parents | e16b3fd0bd80 |
| children | 402d8febfa43 |
comparison
equal
deleted
inserted
replaced
| 8605:3a1efc0532cb | 8606:b6b1f0f9b381 |
|---|---|
| 12 local muc_util = module:require "muc/util"; | 12 local muc_util = module:require "muc/util"; |
| 13 local valid_roles = muc_util.valid_roles; | 13 local valid_roles = muc_util.valid_roles; |
| 14 | 14 |
| 15 local function create_subject_message(from, subject) | 15 local function create_subject_message(from, subject) |
| 16 return st.message({from = from; type = "groupchat"}) | 16 return st.message({from = from; type = "groupchat"}) |
| 17 :tag("subject"):text(subject):up(); | 17 :tag("subject"):text(subject or ""):up(); |
| 18 end | 18 end |
| 19 | 19 |
| 20 local function get_changesubject(room) | 20 local function get_changesubject(room) |
| 21 return room._data.changesubject; | 21 return room._data.changesubject; |
| 22 end | 22 end |
