Software /
code /
prosody
Comparison
tools/ejabberd2prosody.lua @ 11871:5dcbba569fb9
ejabberd2prosody.lua: fix MUC subject conversion with appropriate destructuring
author | arcseconds |
---|---|
date | Tue, 26 Oct 2021 23:29:40 +1300 |
parent | 11849:7440d610e5f1 |
child | 12387:05c250fa335a |
comparison
equal
deleted
inserted
replaced
11870:1d1ed2be3491 | 11871:5dcbba569fb9 |
---|---|
185 function muc_room(node, host, properties) | 185 function muc_room(node, host, properties) |
186 local store = { jid = node.."@"..host, _data = {}, _affiliations = {} }; | 186 local store = { jid = node.."@"..host, _data = {}, _affiliations = {} }; |
187 for _,aff in ipairs(properties.affiliations) do | 187 for _,aff in ipairs(properties.affiliations) do |
188 store._affiliations[build_jid(aff[1])] = aff[2][1] or aff[2]; | 188 store._affiliations[build_jid(aff[1])] = aff[2][1] or aff[2]; |
189 end | 189 end |
190 store._data.subject = properties.subject; | 190 -- destructre ejabberd's subject datum (e.g. [{text,<<>>,<<"my room subject">>}] ) |
191 store._data.subject = properties.subject[1][3]; | |
191 if properties.subject_author then | 192 if properties.subject_author then |
192 store._data.subject_from = store.jid .. "/" .. properties.subject_author; | 193 store._data.subject_from = store.jid .. "/" .. properties.subject_author; |
193 end | 194 end |
194 store._data.name = properties.title; | 195 store._data.name = properties.title; |
195 store._data.description = properties.description; | 196 store._data.description = properties.description; |