mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-28 16:34:13 +01:00
Fix (un)setting of priority
This commit is contained in:
parent
e568dc3866
commit
8295bcebec
@ -317,7 +317,7 @@ set_presence(SID, User, Server, Resource, Priority, Presence) ->
|
|||||||
case get_sessions(Mod, LUser, LServer, LResource) of
|
case get_sessions(Mod, LUser, LServer, LResource) of
|
||||||
[] -> {error, notfound};
|
[] -> {error, notfound};
|
||||||
Ss ->
|
Ss ->
|
||||||
case lists:keyfind(SID, 1, Ss) of
|
case lists:keyfind(SID, #session.sid, Ss) of
|
||||||
#session{info = Info} ->
|
#session{info = Info} ->
|
||||||
set_session(SID, User, Server, Resource, Priority, Info),
|
set_session(SID, User, Server, Resource, Priority, Info),
|
||||||
ejabberd_hooks:run(set_presence_hook,
|
ejabberd_hooks:run(set_presence_hook,
|
||||||
@ -339,7 +339,7 @@ unset_presence(SID, User, Server, Resource, Status) ->
|
|||||||
case get_sessions(Mod, LUser, LServer, LResource) of
|
case get_sessions(Mod, LUser, LServer, LResource) of
|
||||||
[] -> {error, notfound};
|
[] -> {error, notfound};
|
||||||
Ss ->
|
Ss ->
|
||||||
case lists:keyfind(SID, 1, Ss) of
|
case lists:keyfind(SID, #session.sid, Ss) of
|
||||||
#session{info = Info} ->
|
#session{info = Info} ->
|
||||||
set_session(SID, User, Server, Resource, undefined, Info),
|
set_session(SID, User, Server, Resource, undefined, Info),
|
||||||
ejabberd_hooks:run(unset_presence_hook,
|
ejabberd_hooks:run(unset_presence_hook,
|
||||||
|
Loading…
Reference in New Issue
Block a user