Software /
code /
prosody
Changeset
12176:e7639625a848
mod_storage_xep0227: Fix writing non-user data
Attempt to concatenate nil 'user'
Not much data actually makes sense but the migrator tries to write or
clear these.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 10 Jan 2022 16:53:58 +0100 |
parents | 12175:39921b979edb |
children | 12177:024cc878f472 |
files | plugins/mod_storage_xep0227.lua |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_storage_xep0227.lua Mon Jan 10 15:50:55 2022 +0000 +++ b/plugins/mod_storage_xep0227.lua Mon Jan 10 16:53:58 2022 +0100 @@ -7,6 +7,7 @@ local io_open = io.open; local jid_bare = require "util.jid".bare; local jid_prep = require "util.jid".prep; +local jid_join = require "util.jid".join; local array = require "util.array"; local base64 = require "util.encodings".base64; @@ -21,7 +22,7 @@ local lfs = require "lfs"; local function default_get_user_xml(self, user, host) --luacheck: ignore 212/self - local jid = user.."@"..host; + local jid = jid_join(user, host); local path = paths.join(prosody.paths.data, jid..".xml"); local f, err = io_open(path); if not f then @@ -34,7 +35,7 @@ return parse_xml_real(s); end local function default_set_user_xml(user, host, xml) - local jid = user.."@"..host; + local jid = jid_join(user, host); local path = paths.join(prosody.paths.data, jid..".xml"); local f, err = io_open(path, "w"); if not f then return f, err; end