]> granicus.if.org Git - ejabberd/commitdiff
* src/ejabberd_sm.erl: Added set_presence_hook
authorAlexey Shchepin <alexey@process-one.net>
Thu, 3 May 2007 07:41:16 +0000 (07:41 +0000)
committerAlexey Shchepin <alexey@process-one.net>
Thu, 3 May 2007 07:41:16 +0000 (07:41 +0000)
SVN Revision: 760

ChangeLog
src/ejabberd_sm.erl

index a1cae6617e471dc31b978ebdfe707eab76c8589a..0f23f225a5a0803f7ffdff1977adeff8f31961a5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
 
index 7fa24793b32e4774771540e3ccf54955bd5394b6..cfc1bb957dca486044eeffab30b6b903c61adbbe 100644 (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),