Don't use "sensitive"
This commit is contained in:
parent
1e702d4145
commit
010491e0b0
1 changed files with 8 additions and 4 deletions
|
@ -170,12 +170,16 @@ class Processor
|
||||||
*/
|
*/
|
||||||
public static function updateItem($activity)
|
public static function updateItem($activity)
|
||||||
{
|
{
|
||||||
$item = Item::selectFirst(['uri', 'thr-parent', 'gravity'], ['uri' => $activity['id']]);
|
$item = Item::selectFirst(['uri', 'uri-id', 'guid', 'thr-parent', 'gravity'], ['uri' => $activity['id']]);
|
||||||
if (!DBA::isResult($item)) {
|
if (!DBA::isResult($item)) {
|
||||||
Logger::warning('Unknown item', ['uri' => $activity['id']]);
|
Logger::warning('Unknown item', ['uri' => $activity['id']]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($item['uri-id'])) {
|
||||||
|
$item['uri-id'] = ItemURI::insert(['uri' => $item['uri'], 'guid' => $item['guid']]);
|
||||||
|
}
|
||||||
|
|
||||||
$item['changed'] = DateTimeFormat::utcNow();
|
$item['changed'] = DateTimeFormat::utcNow();
|
||||||
$item['edited'] = DateTimeFormat::utc($activity['updated']);
|
$item['edited'] = DateTimeFormat::utc($activity['updated']);
|
||||||
|
|
||||||
|
@ -404,7 +408,7 @@ class Processor
|
||||||
|
|
||||||
$item['tag'] = self::constructTagString($activity['tags'], $activity['sensitive']);
|
$item['tag'] = self::constructTagString($activity['tags'], $activity['sensitive']);
|
||||||
|
|
||||||
self::storeTags($item['uri-id'], $activity['tags'], $activity['sensitive']);
|
self::storeTags($item['uri-id'], $activity['tags']);
|
||||||
|
|
||||||
$item['location'] = $activity['location'];
|
$item['location'] = $activity['location'];
|
||||||
|
|
||||||
|
@ -576,7 +580,7 @@ class Processor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function storeTags(int $uriid, array $tags = null, $sensitive = false)
|
private static function storeTags(int $uriid, array $tags = null)
|
||||||
{
|
{
|
||||||
// Make sure to delete all existing tags (can happen when called via the update functionality)
|
// Make sure to delete all existing tags (can happen when called via the update functionality)
|
||||||
DBA::delete('tag', ['uri-id' => $uriid]);
|
DBA::delete('tag', ['uri-id' => $uriid]);
|
||||||
|
@ -619,7 +623,7 @@ class Processor
|
||||||
|
|
||||||
DBA::insert('tag', $fields, true);
|
DBA::insert('tag', $fields, true);
|
||||||
|
|
||||||
Logger::info('Stored tag/mention', ['uriid' => $uriid, 'tag' => $tag, 'sensitive' => $sensitive, 'fields' => $fields]);
|
Logger::info('Stored tag/mention', ['uriid' => $uriid, 'tag' => $tag, 'fields' => $fields]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue