mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:55:15 +00:00
Use the object type, not the activity type
This commit is contained in:
parent
511d942e22
commit
dc7490bdd5
1 changed files with 3 additions and 1 deletions
|
@ -4322,11 +4322,13 @@ class Activity
|
||||||
intval($item['uid'])
|
intval($item['uid'])
|
||||||
);
|
);
|
||||||
ObjCache::Set($item['mid'], $act->raw);
|
ObjCache::Set($item['mid'], $act->raw);
|
||||||
|
$isPoll = $item['obj_type'] === 'Question';
|
||||||
|
|
||||||
if ($r) {
|
if ($r) {
|
||||||
// Mastodon now sends Update/Question with updated poll responses,
|
// Mastodon now sends Update/Question with updated poll responses,
|
||||||
// but doesn't actually change the updated timestamp. So there is no
|
// but doesn't actually change the updated timestamp. So there is no
|
||||||
// way of knowing if we received poll updates out of order.
|
// 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'];
|
$item['id'] = $r[0]['id'];
|
||||||
$x = item_store_update($item, deliver: false);
|
$x = item_store_update($item, deliver: false);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue