mirror of
https://github.com/processone/ejabberd
synced 2025-10-04 18:29:20 +02:00
Handle user removal in mod_muc
This commit is contained in:
parent
a94209a0e0
commit
8b7da70b57
11 changed files with 80 additions and 2 deletions
|
@ -38,7 +38,7 @@
|
|||
register_online_user/4, unregister_online_user/4,
|
||||
count_online_rooms_by_user/3, get_online_rooms_by_user/3,
|
||||
get_subscribed_rooms/3, get_rooms_without_subscribers/2,
|
||||
find_online_room_by_pid/2]).
|
||||
find_online_room_by_pid/2, remove_user/2]).
|
||||
-export([set_affiliation/6, set_affiliations/4, get_affiliation/5,
|
||||
get_affiliations/3, search_affiliation/4]).
|
||||
|
||||
|
@ -465,6 +465,13 @@ get_subscribed_rooms(LServer, Host, Jid) ->
|
|||
{error, db_failure}
|
||||
end.
|
||||
|
||||
remove_user(LUser, LServer) ->
|
||||
SJID = jid:encode(jid:make(LUser, LServer)),
|
||||
ejabberd_sql:sql_query(
|
||||
LServer,
|
||||
?SQL("delete from muc_room_subscribers where jid=%(SJID)s")),
|
||||
ok.
|
||||
|
||||
%%%===================================================================
|
||||
%%% Internal functions
|
||||
%%%===================================================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue