mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
feat: allow modifying c2s session info
This commit is contained in:
parent
14871c54ac
commit
821bf930b0
@ -150,11 +150,17 @@ route(Packet) ->
|
||||
-spec open_session(sid(), binary(), binary(), binary(), prio(), info()) -> ok.
|
||||
|
||||
open_session(SID, User, Server, Resource, Priority, Info) ->
|
||||
set_session(SID, User, Server, Resource, Priority, Info),
|
||||
Info2 = ejabberd_hooks:run_fold(
|
||||
sm_pre_register_connection_hook,
|
||||
Server,
|
||||
Info,
|
||||
[SID, User, Server, Resource, Priority]
|
||||
),
|
||||
set_session(SID, User, Server, Resource, Priority, Info2),
|
||||
check_for_sessions_to_replace(User, Server, Resource),
|
||||
JID = jid:make(User, Server, Resource),
|
||||
ejabberd_hooks:run(sm_register_connection_hook,
|
||||
JID#jid.lserver, [SID, JID, Info]).
|
||||
JID#jid.lserver, [SID, JID, Info2]).
|
||||
|
||||
-spec open_session(sid(), binary(), binary(), binary(), info()) -> ok.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user