25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

* src/ejabberd_sm.erl: Added set_presence_hook

SVN Revision: 760
This commit is contained in:
Alexey Shchepin 2007-05-03 07:41:16 +00:00
parent 2ae5d13ab8
commit ab0d7b9151
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,7 @@
2007-05-03 Alexey Shchepin <alexey@sevcom.net>
* src/ejabberd_sm.erl: Added set_presence_hook
* src/ejabberd_sm.erl: Added check for existence of incoming
subscription destination

View File

@ -111,7 +111,9 @@ get_user_resources(User, Server) ->
end.
set_presence(SID, User, Server, Resource, Priority) ->
set_session(SID, User, Server, Resource, Priority).
set_session(SID, User, Server, Resource, Priority),
ejabberd_hooks:run(set_presence_hook, jlib:nameprep(Server),
[User, Server, Resource, Priority]).
unset_presence(SID, User, Server, Resource, Status) ->
set_session(SID, User, Server, Resource, undefined),