You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Erlang version: Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version 13.1.5
OS: Debian GNU/Linux 12 (bookworm)
Installed from: source
Errors from cli:
ejabberdctl import_prosody "/var/lib/prosody/"
Unhandled exception occurred executing the command:
** exception error: no function clause matching
prosody2ejabberd:'-convert_roster_item/4-fun-1-'({<<"approved">>,
<<"true">>},
[{roster,
{<<"user">>,
<<"5222.de">>,
{<<"admin">>,
<<"5222.de">>,
<<>>}},
{<<"user">>,
<<"5222.de">>},
{<<"admin">>,
<<"5222.de">>,
<<>>},
<<>>,
none,
none,[],
<<>>,
[]}]) (src/prosody2ejabberd.erl, line 311)
in function lists:foldl/3 (lists.erl, line 1350)
in call from lists:flatmap_1/2 (lists.erl, line 1335)
in call from lists:flatmap_1/2 (lists.erl, line 1335)
in call from prosody2ejabberd:convert_data/4 (src/prosody2ejabberd.erl, line 162)
in call from lists:foreach_1/2 (lists.erl, line 1442)
in call from ejabberd_ctl:call_command/4 (src/ejabberd_ctl.erl, line 327)
in call from ejabberd_ctl:try_call_command/4 (src/ejabberd_ctl.erl, line 288)
Nice finding! prosody2ejabberd didn't know how to handle the approved attribute.
In fact, it is an optional attribute and it seems not implemented in ejabberd or the xmpp erlang library. The import code should be able to handle it, even if it does not store the content.
I've committed a fix for this problem, and also included a fix for previous code that forgot R. It seems to work great with your example.
Notice this commit is slightly different than your patch, because you were also fogetting R when handling approved.
When I try to import a slightly larger instance of Prosody, I get some errors.
Environment
Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version 13.1.5
Errors from cli:
ejabberdctl import_prosody "/var/lib/prosody/"
Example minimal reproducible:
/var/lib/prosody/5222%2ede/roster/user.dat
Bug description
The user [email protected] will be import. He has entered [email protected] as a contact and is also countersigned with
["approved"] = "true"
.I have added the following roundtrip to line 325:
But it would make more sense to adopt this attribute as well.
The text was updated successfully, but these errors were encountered: