mirror of
https://github.com/friendica/friendica
synced 2025-04-25 23:50:11 +00:00
Poco now returns the last update date as well. This date will be stored in the gcontact table.
This commit is contained in:
parent
3195bacd9e
commit
11c82816b3
6 changed files with 43 additions and 11 deletions
|
@ -1343,6 +1343,16 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
|
|||
$current_post = $r[0]['id'];
|
||||
logger('item_store: created item ' . $current_post);
|
||||
|
||||
// Set "success_update" to the date of the last time we heard from this contact
|
||||
// This can be used to filter for inactive contacts and poco.
|
||||
// Only do this for public postings to avoid privacy problems, since poco data is public.
|
||||
// Don't set this value if it isn't from the owner (could be an author that we don't know)
|
||||
if (!$arr['private'] AND (($arr["author-link"] === $arr["owner-link"]) OR ($arr["parent-uri"] === $arr["uri"])))
|
||||
$r = q("UPDATE `contact` SET `success_update` = '%s' WHERE `id` = %d",
|
||||
dbesc($arr['received']),
|
||||
intval($arr['contact-id'])
|
||||
);
|
||||
|
||||
// Only check for notifications on start posts
|
||||
if ($arr['parent-uri'] === $arr['uri']) {
|
||||
add_thread($r[0]['id']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue