mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-06-19 16:45:17 +00:00
Automatically update last activity time of a call
This commit is contained in:
@ -99,6 +99,27 @@ class CallsComponents {
|
||||
return $info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update last activity time of a conversation
|
||||
*
|
||||
* @param $call_id The ID of the call to update
|
||||
* @return bool TRUE for a success / FALSE else
|
||||
*/
|
||||
public function updateLastActivity(int $call_id) : bool {
|
||||
|
||||
return db()->updateDB(
|
||||
self::CALLS_LIST_TABLE,
|
||||
"id = ?",
|
||||
array(
|
||||
"last_active" => time()
|
||||
),
|
||||
array(
|
||||
$call_id
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next call for a user
|
||||
*
|
||||
|
Reference in New Issue
Block a user