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