Skip to content

Commit

Permalink
Make name in storage:bookmark conference optional
Browse files Browse the repository at this point in the history
  • Loading branch information
prefiks committed Sep 27, 2023
1 parent a4ddbbb commit 68cb07d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions specs/xmpp_codec.spec
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,7 @@
module = 'xep0048',
result = {bookmark_conference, '$name', '$jid',
'$autojoin', '$nick', '$password'},
attrs = [#attr{name = <<"name">>,
required = true},
attrs = [#attr{name = <<"name">>},
#attr{name = <<"jid">>,
required = true,
dec = {jid, decode, []},
Expand Down
8 changes: 3 additions & 5 deletions src/xep0048.erl
Original file line number Diff line number Diff line change
Expand Up @@ -404,15 +404,13 @@ encode_bookmark_conference({bookmark_conference,

decode_bookmark_conference_attr_name(__TopXMLNS,
undefined) ->
erlang:error({xmpp_codec,
{missing_attr,
<<"name">>,
<<"conference">>,
__TopXMLNS}});
<<>>;
decode_bookmark_conference_attr_name(__TopXMLNS,
_val) ->
_val.

encode_bookmark_conference_attr_name(<<>>, _acc) ->
_acc;
encode_bookmark_conference_attr_name(_val, _acc) ->
[{<<"name">>, _val} | _acc].

Expand Down

0 comments on commit 68cb07d

Please sign in to comment.