mirror of
https://github.com/processone/ejabberd.git
synced 2024-10-11 15:08:56 +02:00
* src/mod_privacy.erl: Fixed privacy list pushing (thanks to
Sergei Golovan) * src/ejabberd_c2s.erl: Likewise SVN Revision: 520
This commit is contained in:
parent
eabf8d1c6c
commit
a6b3e6c904
@ -1,3 +1,9 @@
|
||||
2006-03-17 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/mod_privacy.erl: Fixed privacy list pushing (thanks to
|
||||
Sergei Golovan)
|
||||
* src/ejabberd_c2s.erl: Likewise
|
||||
|
||||
2006-03-16 Mickael Remond <mickael.remond@process-one.net>
|
||||
|
||||
* src/ejabberd_sm.erl: Remove unnecessary use delete_object, which can,
|
||||
|
@ -1015,7 +1015,7 @@ handle_info({route, From, To, Packet}, StateName, StateData) ->
|
||||
StateData)};
|
||||
[{exit, Reason}] ->
|
||||
{exit, Attrs, Reason};
|
||||
[{privacy_list, PrivList}] ->
|
||||
[{privacy_list, PrivList, PrivListName}] ->
|
||||
{false, Attrs,
|
||||
case catch mod_privacy:updated_list(
|
||||
StateData#state.privacy_list,
|
||||
@ -1023,6 +1023,21 @@ handle_info({route, From, To, Packet}, StateName, StateData) ->
|
||||
{'EXIT', _} ->
|
||||
{false, Attrs, StateData};
|
||||
NewPL ->
|
||||
PrivPushIQ =
|
||||
#iq{type = set, xmlns = ?NS_PRIVACY,
|
||||
id = "push",
|
||||
sub_el = [{xmlelement, "query",
|
||||
[{"xmlns", ?NS_PRIVACY}],
|
||||
[{xmlelement, "list",
|
||||
[{"name", PrivListName}],
|
||||
[]}]}]},
|
||||
PrivPushEl =
|
||||
jlib:replace_from_to(
|
||||
jlib:jid_remove_resource(
|
||||
StateData#state.jid),
|
||||
StateData#state.jid,
|
||||
jlib:iq_to_xml(PrivPushIQ)),
|
||||
send_element(StateData, PrivPushEl),
|
||||
StateData#state{privacy_list = NewPL}
|
||||
end};
|
||||
_ ->
|
||||
|
@ -362,7 +362,9 @@ process_list_set(LUser, LServer, {value, Name}, Els) ->
|
||||
jlib:make_jid(LUser, ?MYNAME, ""),
|
||||
jlib:make_jid(LUser, ?MYNAME, ""),
|
||||
{xmlelement, "broadcast", [],
|
||||
[{privacy_list, #userlist{name = Name, list = []}}]}),
|
||||
[{privacy_list,
|
||||
#userlist{name = Name, list = []},
|
||||
Name}]}),
|
||||
Res;
|
||||
_ ->
|
||||
{error, ?ERR_INTERNAL_SERVER_ERROR}
|
||||
@ -391,7 +393,9 @@ process_list_set(LUser, LServer, {value, Name}, Els) ->
|
||||
jlib:make_jid(LUser, ?MYNAME, ""),
|
||||
jlib:make_jid(LUser, ?MYNAME, ""),
|
||||
{xmlelement, "broadcast", [],
|
||||
[{privacy_list, #userlist{name = Name, list = List}}]}),
|
||||
[{privacy_list,
|
||||
#userlist{name = Name, list = List},
|
||||
Name}]}),
|
||||
Res;
|
||||
_ ->
|
||||
{error, ?ERR_INTERNAL_SERVER_ERROR}
|
||||
|
Loading…
Reference in New Issue
Block a user