Software /
code /
prosody-modules
Changeset
4111:ae2699f1cba9
mod_register_apps: Don't duplicate client entries on module reload
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 12 Sep 2020 08:23:09 +0100 |
parents | 4110:fdc84741258d |
children | 4112:d0366474aace |
files | mod_register_apps/mod_register_apps.lua |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_register_apps/mod_register_apps.lua Fri Sep 11 16:57:09 2020 +0100 +++ b/mod_register_apps/mod_register_apps.lua Sat Sep 12 08:23:09 2020 +0100 @@ -90,7 +90,7 @@ platforms = { "Windows", "Linux" }; download = { buttons = { - { + { text = "Download Gajim"; url = "https://gajim.org/download/"; target = "_blank"; @@ -110,11 +110,18 @@ local site_apps = module:shared("apps"); +for k, v in pairs(site_apps) do + if v._source == module.name then + site_apps[k] = nil; + end +end + for _, app_info in ipairs(app_config) do local app_id = app_info.id or app_info.name:gsub("%W+", "-"):lower(); app_info.id = app_id; app_info.image = relurl(app_info.image); site_apps[app_id] = app_info; + app_info._source = module.name; table.insert(site_apps, app_info); end