* src/mod_muc/mod_muc_room.erl: API improvement: Implementation of an

event to destroy MUC room from an external application (Thanks to
Massimiliano Mirra) (EJAB-184).

SVN Revision: 727
This commit is contained in:
Mickaël Rémond 2007-02-19 09:45:58 +00:00
parent 0d5e433b91
commit 909cfd7b21
2 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2007-02-19 Mickael Remond <mickael.remond@process-one.net>
* src/mod_muc/mod_muc_room.erl: API improvement: Implementation of an
event to destroy MUC room from an external application (Thanks to
Massimiliano Mirra) (EJAB-184).
2007-02-18 Alexey Shchepin <alexey@sevcom.net>
* src/ejabberd_s2s.erl: Confirm to RFC3920 section 10.3 (thanks to

View File

@ -606,6 +606,21 @@ handle_event({service_message, Msg}, _StateName, StateData) ->
StateData),
{next_state, normal_state, NSD};
handle_event({destroy, Reason}, _StateName, StateData) ->
{result, [], stop} =
destroy_room(
{xmlelement, "destroy",
[{"xmlns", ?NS_MUC_OWNER}],
case Reason of
none -> [];
_Else ->
[{xmlelement, "reason",
[], [{xmlcdata, Reason}]}]
end}, StateData),
{stop, stopped_by_event, StateData};
handle_event(destroy, StateName, StateData) ->
handle_event({destroy, none}, StateName, StateData);
handle_event(_Event, StateName, StateData) ->
{next_state, StateName, StateData}.