Use the object type, not the activity type

This commit is contained in:
Mike Macgirvin 2024-03-03 22:08:08 +11:00
parent 511d942e22
commit dc7490bdd5

View file

@ -4322,11 +4322,13 @@ class Activity
intval($item['uid'])
);
ObjCache::Set($item['mid'], $act->raw);
$isPoll = $item['obj_type'] === 'Question';
if ($r) {
// Mastodon now sends Update/Question with updated poll responses,
// but doesn't actually change the updated timestamp. So there is no
// way of knowing if we received poll updates out of order.
if ($item['edited'] > $r[0]['edited'] || $item['verb'] === 'Question') {
if ($item['edited'] > $r[0]['edited'] || $isPoll) {
$item['id'] = $r[0]['id'];
$x = item_store_update($item, deliver: false);
} else {