]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
more presence and not the kind with bows and ribbons
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 20 Dec 2010 20:36:03 +0000 (14:36 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 20 Dec 2010 20:36:10 +0000 (14:36 -0600)
src/mod/endpoints/mod_sofia/sofia_presence.c

index f0cade3e613b6ff042b1ee30dbff034989989a21..059018986cfff917b8c017dca8c0d6c990aa4ecc 100644 (file)
@@ -840,10 +840,11 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
                                                                  "where sip_subscriptions.expires > -1 and "
                                                                  "(event='%q' or event='%q') and sub_to_user='%q' "
                                                                  "and (sub_to_host='%q' or presence_hosts like '%%%q%%') "
-                                                                 "and (sip_subscriptions.profile_name = '%q' or sip_subscriptions.presence_hosts != sip_subscriptions.sub_to_host)",
+                                                                 "and (sip_subscriptions.profile_name = '%q' or sip_subscriptions.presence_hosts != sip_subscriptions.sub_to_host) "
+                                                                 "and (presence_id is null or presence_id = '%q@%q')",
                                                                  switch_str_nil(status), switch_str_nil(rpid), host, 
                                                                  dh.status,dh.rpid,
-                                                                 event_type, alt_event_type, euser, host, host, profile->name))) {
+                                                                 event_type, alt_event_type, euser, host, host, profile->name, euser, host))) {
                        
                        struct presence_helper helper = { 0 };