mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Handle the "approved" attribute. As feature isn't implemented, discard it (#4188)
Reference: https://xmpp.org/rfcs/rfc6121.html#roster-syntax-items-approved Additionally, when roster contains unknown attribute, discard it and show a warning
This commit is contained in:
parent
735516ed37
commit
7c76f2b764
@ -322,8 +322,13 @@ convert_roster_item(LUser, LServer, JIDstring, LuaList) ->
|
||||
[R#roster{name = Name}];
|
||||
({<<"persist">>, false}, _) ->
|
||||
[];
|
||||
(_, []) ->
|
||||
[]
|
||||
({<<"approved">>, _}, [R]) ->
|
||||
[R];
|
||||
(A, [R]) ->
|
||||
io:format("Warning: roster of user ~ts@~ts includes unknown "
|
||||
"attribute:~n ~p~nand that one is discarded.~n",
|
||||
[LUser, LServer, A]),
|
||||
[R]
|
||||
end, [InitR], LuaList)
|
||||
catch _:{bad_jid, _} ->
|
||||
[]
|
||||
|
Loading…
Reference in New Issue
Block a user