Adapt to new ejabberd_sm changes

This commit is contained in:
Paweł Chmielowski 2017-01-23 19:34:22 +01:00 committed by Paweł Chmielowski
parent 8b5e6e4a13
commit b0e72ece43
1 changed files with 8 additions and 8 deletions

View File

@ -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