25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-24 17:29:28 +01:00

Search also for _jid when importing room from prosody (#2723)

This commit is contained in:
Badlop 2018-12-19 12:10:07 +01:00
parent 0b151f5902
commit 590bb0e64a

View File

@ -189,7 +189,11 @@ convert_data(Host, "vcard", User, [Data]) ->
ok
end;
convert_data(_Host, "config", _User, [Data]) ->
RoomJID = jid:decode(proplists:get_value(<<"jid">>, Data, <<"">>)),
RoomJID1 = case proplists:get_value(<<"jid">>, Data, not_found) of
not_found -> proplists:get_value(<<"_jid">>, Data, room_jid_not_found);
A when is_binary(A) -> A
end,
RoomJID = jid:decode(RoomJID1),
Config = proplists:get_value(<<"_data">>, Data, []),
RoomCfg = convert_room_config(Data),
case proplists:get_bool(<<"persistent">>, Config) of