mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-24 17:29:28 +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
|
||||
[] -> {error, notfound};
|
||||
Ss ->
|
||||
case lists:keyfind(SID, 1, Ss) of
|
||||
case lists:keyfind(SID, #session.sid, Ss) of
|
||||
#session{info = Info} ->
|
||||
set_session(SID, User, Server, Resource, Priority, Info),
|
||||
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
|
||||
[] -> {error, notfound};
|
||||
Ss ->
|
||||
case lists:keyfind(SID, 1, Ss) of
|
||||
case lists:keyfind(SID, #session.sid, Ss) of
|
||||
#session{info = Info} ->
|
||||
set_session(SID, User, Server, Resource, undefined, Info),
|
||||
ejabberd_hooks:run(unset_presence_hook,
|
||||
|
Loading…
Reference in New Issue
Block a user