Comparison

tools/ejabberd2prosody.lua @ 6006:95ce7bfbfa6f

tools/ejabberd2prosody: Handle new room member format.
author Kim Alvefur <zash@zash.se>
date Mon, 27 Jan 2014 16:47:54 +0100
parent 5999:e49c0c677c5d
child 6007:ff24bc2d41a6
child 6024:c352d97cf137
comparison
equal deleted inserted replaced
5999:e49c0c677c5d 6006:95ce7bfbfa6f
161 end 161 end
162 end 162 end
163 function muc_room(node, host, properties) 163 function muc_room(node, host, properties)
164 local store = { jid = node.."@"..host, _data = {}, _affiliations = {} }; 164 local store = { jid = node.."@"..host, _data = {}, _affiliations = {} };
165 for _,aff in ipairs(properties.affiliations) do 165 for _,aff in ipairs(properties.affiliations) do
166 store._affiliations[_table_to_jid(aff[1])] = aff[2]; 166 store._affiliations[_table_to_jid(aff[1])] = aff[2][1] or aff[2];
167 end 167 end
168 store._data.subject = properties.subject; 168 store._data.subject = properties.subject;
169 if properties.subject_author then 169 if properties.subject_author then
170 store._data.subject_from = store.jid .. "/" .. properties.subject_author; 170 store._data.subject_from = store.jid .. "/" .. properties.subject_author;
171 end 171 end