fix sql query and provide setting to hide online status
This commit is contained in:
@@ -50,6 +50,7 @@ function ping_init(&$a) {
|
||||
if($r) {
|
||||
foreach($r as $rr) {
|
||||
q("update chatpresence set cp_last = '%s' where cp_id = %d limit 1",
|
||||
dbesc(datetime_convert()),
|
||||
intval($rr['cp_id'])
|
||||
);
|
||||
}
|
||||
@@ -67,7 +68,6 @@ function ping_init(&$a) {
|
||||
|
||||
q("delete from chatpresence where cp_last < UTC_TIMESTAMP() - INTERVAL 2 MINUTE");
|
||||
|
||||
|
||||
if((! local_user()) || ($result['invalid'])) {
|
||||
echo json_encode($result);
|
||||
killme();
|
||||
|
||||
Reference in New Issue
Block a user