mirror of
https://github.com/friendica/friendica
synced 2024-06-14 14:46:26 +02:00
Use verb
This commit is contained in:
parent
22b01992d2
commit
72f5a64cf3
|
@ -1062,9 +1062,6 @@ class Conversation
|
|||
|
||||
if (isset($emojis[$row['thr-parent-id']][$emoji]['title'])) {
|
||||
$emojis[$row['thr-parent-id']][$emoji]['title'] = array_unique(array_merge($emojis[$row['thr-parent-id']][$emoji]['title'] ?? [], explode($separator, $row['title'])));
|
||||
} else {
|
||||
Post\Counts::updateForPost($row['thr-parent-id'], $row['parent-uri-id']);
|
||||
$this->logger->debug('Add missing counts', ['thr-parent-id' => $row['thr-parent-id'], 'parent-uri-id' => $row['parent-uri-id'], 'emoji' => $emoji]);
|
||||
}
|
||||
}
|
||||
DBA::close($rows);
|
||||
|
|
|
@ -106,16 +106,16 @@ class Counts
|
|||
Activity::READ => '📖',
|
||||
];
|
||||
|
||||
$vids = array_merge(array_keys($activity_emoji), [Activity::EMOJIREACT, Activity::POST]);
|
||||
$verbs = array_merge(array_keys($activity_emoji), [Activity::EMOJIREACT, Activity::POST]);
|
||||
|
||||
$condition = DBA::mergeConditions($condition, ['verb' => $vids]);
|
||||
$condition = DBA::mergeConditions($condition, ['verb' => $verbs]);
|
||||
$countquery = DBA::select('post-counts-view', [], $condition);
|
||||
while ($count = DBA::fetch($countquery)) {
|
||||
if (!empty($count['reaction'])) {
|
||||
$count['verb'] = Activity::EMOJIREACT;
|
||||
$count['vid'] = Verb::getID($count['verb']);
|
||||
} elseif (!empty($activity_emoji[$count['vid']])) {
|
||||
$count['reaction'] = $activity_emoji[$count['vid']];
|
||||
} elseif (!empty($activity_emoji[$count['verb']])) {
|
||||
$count['reaction'] = $activity_emoji[$count['verb']];
|
||||
}
|
||||
$counts[] = $count;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue