prevent runaway presence indication
This commit is contained in:
parent
10b51a9471
commit
c95f65e092
@ -44,14 +44,14 @@ function ping_init(&$a) {
|
||||
}
|
||||
|
||||
if(get_observer_hash() && (! $result['invalid'])) {
|
||||
$r = q("select cp_id from chatpresence where cp_xchan = '%s' and cp_client = '%s'",
|
||||
$r = q("select cp_id, cp_room from chatpresence where cp_xchan = '%s' and cp_client = '%s'",
|
||||
dbesc(get_observer_hash()),
|
||||
dbesc($_SERVER['REMOTE_ADDR'])
|
||||
);
|
||||
$basic_presence = false;
|
||||
if($r) {
|
||||
foreach($r as $rr) {
|
||||
if($rr['cp_id'] == 0)
|
||||
if($rr['cp_room'] == 0)
|
||||
$basic_presence = true;
|
||||
q("update chatpresence set cp_last = '%s' where cp_id = %d limit 1",
|
||||
dbesc(datetime_convert()),
|
||||
|
Reference in New Issue
Block a user