Mercurial > prosody-modules
comparison mod_muc_webchat_url/mod_muc_webchat_url.lua @ 3675:776ff0875e35
mod_muc_webchat_url: Fix default url
Function split gone wrong
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 17 Sep 2019 17:36:20 +0200 |
| parents | 11ebf1da416b |
| children | dcafddc31b1c |
comparison
equal
deleted
inserted
replaced
| 3674:8ee5816363b0 | 3675:776ff0875e35 |
|---|---|
| 22 local function get_webchat_url(room) | 22 local function get_webchat_url(room) |
| 23 local webchat_url = room._data.webchat_url; | 23 local webchat_url = room._data.webchat_url; |
| 24 if webchat_url then -- explicitly configured | 24 if webchat_url then -- explicitly configured |
| 25 return webchat_url; | 25 return webchat_url; |
| 26 end | 26 end |
| 27 return get_default_url(room); | |
| 27 end | 28 end |
| 28 | 29 |
| 29 module:hook("muc-config-form", function(event) | 30 module:hook("muc-config-form", function(event) |
| 30 local room, form = event.room, event.form; | 31 local room, form = event.room, event.form; |
| 31 table.insert(form, { | 32 table.insert(form, { |
