{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.11"}}},
{stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.8"}}},
{fast_xml, ".*", {git, "https://github.com/processone/fast_xml", {tag, "1.1.21"}}},
- {xmpp, ".*", {git, "https://github.com/processone/xmpp", "ad15e74e073a9cd230f31f657b395b1873227875"}},
+ {xmpp, ".*", {git, "https://github.com/processone/xmpp", "806ac5e4ebfbcf1f8f5ebe5a8458ebb7e250d501"}},
{stun, ".*", {git, "https://github.com/processone/stun", {tag, "1.0.10"}}},
{esip, ".*", {git, "https://github.com/processone/esip", {tag, "1.0.11"}}},
{fast_yaml, ".*", {git, "https://github.com/processone/fast_yaml", {tag, "1.0.9"}}},
add_new_user(From, Nick, Packet, SD2)
end;
process_iq_mucsub(From, #iq{type = set, lang = Lang,
- sub_els = [#muc_unsubscribe{jid = UnsubJid}]},
- StateData) when UnsubJid /= <<>> ->
+ sub_els = [#muc_unsubscribe{jid = #jid{} = UnsubJid}]},
+ StateData) ->
FAffiliation = get_affiliation(From, StateData),
FRole = get_role(From, StateData),
- try jid:decode(UnsubJid) of
- FromUnsub when FRole == moderator; FAffiliation == owner; FAffiliation == admin ->
- process_iq_mucsub(FromUnsub, #iq{type = set, sub_els = [#muc_unsubscribe{jid = <<>>}]},
- StateData);
- _ ->
+ if FRole == moderator; FAffiliation == owner; FAffiliation == admin ->
+ process_iq_mucsub(UnsubJid,
+ #iq{type = set,
+ sub_els = [#muc_unsubscribe{jid = undefined}]},
+ StateData);
+ true ->
Txt = <<"Moderator privileges required">>,
{error, xmpp:err_forbidden(Txt, Lang)}
- catch
- error:{bad_jid,_} ->
- {error, xmpp:err_jid_malformed()}
end;
process_iq_mucsub(From, #iq{type = set, sub_els = [#muc_unsubscribe{}]},
StateData) ->