mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 06:55:19 +00:00
allow folks to update Mastodon polls manually by entering the ActivityPub id in the search bar; since Mastodon doesn't set the updated timestamp nor track 3rd party conversation subscriptions
This commit is contained in:
parent
5233df734f
commit
143a4166b2
1 changed files with 4 additions and 2 deletions
|
@ -2975,8 +2975,10 @@ class Activity
|
|||
$s['verb'] = self::activity_mapper($act->type);
|
||||
|
||||
// Mastodon does not provide update timestamps when updating poll tallies which means race conditions may occur here.
|
||||
if ($act->type === 'Update' && $act->obj['type'] === 'Question' && $s['edited'] === $s['created']) {
|
||||
$s['edited'] = datetime_convert();
|
||||
if (in_array($act->type,['Create','Update']) && $act->obj['type'] === 'Question' && $s['edited'] === $s['created']) {
|
||||
if (isset($act->obj['votersCount']) && intval($act->obj['votersCount'])) {
|
||||
$s['edited'] = datetime_convert();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue