mirror of
https://github.com/friendica/friendica
synced 2025-04-22 13:10:11 +00:00
Issue 10365: Event updates are now processed
This commit is contained in:
parent
925b3ab565
commit
bd8032f2ba
2 changed files with 42 additions and 0 deletions
|
@ -1428,6 +1428,16 @@ class Item
|
|||
private static function storeForUser(array $item, int $uid)
|
||||
{
|
||||
if (Post::exists(['uri-id' => $item['uri-id'], 'uid' => $uid])) {
|
||||
if (!empty($item['event-id'])) {
|
||||
$post = Post::selectFirst(['event-id'], ['uri-id' => $item['uri-id'], 'uid' => $uid]);
|
||||
if (!empty($post['event-id'])) {
|
||||
$event = DBA::selectFirst('event', ['edited', 'start', 'finish', 'summary', 'desc', 'location', 'nofinish', 'adjust'], ['id' => $item['event-id']]);
|
||||
if (!empty($event)) {
|
||||
$ret = DBA::update('event', $event, ['id' => $post['event-id']]);
|
||||
Logger::info('Event updated', ['uid' => $uid, 'source-event' => $item['event-id'], 'target-event' => $post['event-id'], 'ret' => $ret]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Logger::info('Item already exists', ['uri-id' => $item['uri-id'], 'uid' => $uid]);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue