mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01: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>
|
2006-03-16 Mickael Remond <mickael.remond@process-one.net>
|
||||||
|
|
||||||
* src/ejabberd_sm.erl: Remove unnecessary use delete_object, which can,
|
* src/ejabberd_sm.erl: Remove unnecessary use delete_object, which can,
|
||||||
|
@ -1015,7 +1015,7 @@ handle_info({route, From, To, Packet}, StateName, StateData) ->
|
|||||||
StateData)};
|
StateData)};
|
||||||
[{exit, Reason}] ->
|
[{exit, Reason}] ->
|
||||||
{exit, Attrs, Reason};
|
{exit, Attrs, Reason};
|
||||||
[{privacy_list, PrivList}] ->
|
[{privacy_list, PrivList, PrivListName}] ->
|
||||||
{false, Attrs,
|
{false, Attrs,
|
||||||
case catch mod_privacy:updated_list(
|
case catch mod_privacy:updated_list(
|
||||||
StateData#state.privacy_list,
|
StateData#state.privacy_list,
|
||||||
@ -1023,6 +1023,21 @@ handle_info({route, From, To, Packet}, StateName, StateData) ->
|
|||||||
{'EXIT', _} ->
|
{'EXIT', _} ->
|
||||||
{false, Attrs, StateData};
|
{false, Attrs, StateData};
|
||||||
NewPL ->
|
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}
|
StateData#state{privacy_list = NewPL}
|
||||||
end};
|
end};
|
||||||
_ ->
|
_ ->
|
||||||
|
@ -362,7 +362,9 @@ process_list_set(LUser, LServer, {value, Name}, Els) ->
|
|||||||
jlib:make_jid(LUser, ?MYNAME, ""),
|
jlib:make_jid(LUser, ?MYNAME, ""),
|
||||||
jlib:make_jid(LUser, ?MYNAME, ""),
|
jlib:make_jid(LUser, ?MYNAME, ""),
|
||||||
{xmlelement, "broadcast", [],
|
{xmlelement, "broadcast", [],
|
||||||
[{privacy_list, #userlist{name = Name, list = []}}]}),
|
[{privacy_list,
|
||||||
|
#userlist{name = Name, list = []},
|
||||||
|
Name}]}),
|
||||||
Res;
|
Res;
|
||||||
_ ->
|
_ ->
|
||||||
{error, ?ERR_INTERNAL_SERVER_ERROR}
|
{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, ""),
|
||||||
jlib:make_jid(LUser, ?MYNAME, ""),
|
jlib:make_jid(LUser, ?MYNAME, ""),
|
||||||
{xmlelement, "broadcast", [],
|
{xmlelement, "broadcast", [],
|
||||||
[{privacy_list, #userlist{name = Name, list = List}}]}),
|
[{privacy_list,
|
||||||
|
#userlist{name = Name, list = List},
|
||||||
|
Name}]}),
|
||||||
Res;
|
Res;
|
||||||
_ ->
|
_ ->
|
||||||
{error, ?ERR_INTERNAL_SERVER_ERROR}
|
{error, ?ERR_INTERNAL_SERVER_ERROR}
|
||||||
|
Loading…
Reference in New Issue
Block a user