mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
Adapt to new ejabberd_sm changes
This commit is contained in:
parent
8b5e6e4a13
commit
b0e72ece43
@ -42,14 +42,14 @@ defmodule EjabberdSmMock do
|
||||
fn (user, domain) -> for s <- get_sessions(user, domain), do: s.resource end)
|
||||
|
||||
mock(:ejabberd_sm, :route,
|
||||
fn (_from, to, {:broadcast, {:exit, _reason}}) ->
|
||||
user = jid(to, :user)
|
||||
domain = jid(to, :server)
|
||||
resource = jid(to, :resource)
|
||||
disconnect_resource(user, domain, resource)
|
||||
:ok
|
||||
(_, _, _) -> :ok
|
||||
end)
|
||||
fn (to, {:exit, _reason}) ->
|
||||
user = jid(to, :user)
|
||||
domain = jid(to, :server)
|
||||
resource = jid(to, :resource)
|
||||
disconnect_resource(user, domain, resource)
|
||||
:ok
|
||||
(_, _) -> :ok
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user