Commit graph

14748 commits

Author SHA1 Message Date
6d7cad98f8 add changelog entry
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline failed
2022-09-06 19:37:17 +01:00
Tusooa Zhu
ff7fbf70c0 Make NoEmptyPolicy work with Update
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
2022-09-06 18:09:55 +01:00
Tusooa Zhu
0583979f89 Make AntiLinkSpamPolicy history-aware 2022-09-06 18:09:55 +01:00
Tusooa Zhu
6f44858f65 Make HashtagPolicy history-aware 2022-09-06 18:09:55 +01:00
Tusooa Zhu
4c9b16c654 Make NormalizeMarkup history-aware 2022-09-06 18:09:55 +01:00
Tusooa Zhu
037cb50051 Make NoPlaceholderTextPolicy history-aware 2022-09-06 18:09:55 +01:00
Tusooa Zhu
7032224a10 Make MediaProxyWarmingPolicy history-aware 2022-09-06 18:09:55 +01:00
Tusooa Zhu
088951b65a Make EnsureRePrepended history-aware 2022-09-06 18:09:55 +01:00
Tusooa Zhu
593df1413c Make MRF Keyword history-aware 2022-09-06 18:09:55 +01:00
Tusooa Zhu
0e06b59a20 Fix remote emoji in subject disappearing after edits 2022-09-06 18:09:55 +01:00
Tusooa Zhu
7f3e156840 Test that Question updates are viable 2022-09-06 18:09:55 +01:00
Tusooa Zhu
9e88fbcdb1 Guard against outdated Updates
It is possible for an earlier Update to be received by us later.
For this, we now
(1) only allows Updates to poll counts if there is no updated field,
    or the updated field is the same as the last updated date or
    creation date;
(2) does not allow updating anything if the updated field
    is older than the last updated date or creation date;
(3) allows updating updatable fields otherwise (normal updates);
(4) if only the updated field is changed, it does not create
    a new history item on its own.
2022-09-06 18:09:55 +01:00
Tusooa Zhu
9b6cc76be0 Fix cannot get full history on object fetch 2022-09-06 18:09:55 +01:00
Tusooa Zhu
3411bb819f Validate object data for incoming Update activities
In Create validator we do not validate the object data,
but that is because the object itself will go through the
pipeline again, which is not the case for Update. Thus,
we added validation for objects in Update activities.
2022-09-06 18:09:55 +01:00
Tusooa Zhu
090bda6877 Pass history items through ObjectValidator for updatable object types 2022-09-06 18:09:54 +01:00
Tusooa Zhu
1a17cef083 Make outbound transmogrifier aware of edit history 2022-09-06 18:09:26 +01:00
Tusooa Zhu
9e4c87a152 Do not put meta[:object_data] for local Updates 2022-09-06 18:09:26 +01:00
Tusooa Zhu
f4d9633141 Fix local updates causing emojis to be lost 2022-09-06 18:09:26 +01:00
Tusooa Zhu
a299c64cad Verify that formerRepresentation provided in Update is used 2022-09-06 18:09:26 +01:00
Tusooa Zhu
bee60c461b Reuse formerRepresentations from remote if possible 2022-09-06 18:09:26 +01:00
Tusooa Zhu
7977931e01 Unify the logic of updating objects 2022-09-06 18:09:26 +01:00
Tusooa Zhu
5f0d1889ce Fix CommonAPITest 2022-09-06 18:09:26 +01:00
Tusooa Zhu
2dbd969e6e Use meta[:object_data] in SideEffects for Update 2022-09-06 18:09:26 +01:00
Tusooa Zhu
12f3b124ed Convert incoming Updated object into Pleroma format 2022-09-06 18:09:26 +01:00
Tusooa Zhu
db74f786d9 Add editing to features 2022-09-06 18:09:26 +01:00
Tusooa Zhu
9c31797806 Show original status at the first of history 2022-09-06 18:09:26 +01:00
Tusooa Zhu
a01cb6624e Workaround with_index does not support function in Elixir 1.9 2022-09-06 18:09:26 +01:00
Tusooa Zhu
1f705b5cab Send the correct update in streamer
get_create_by_ap_id_with_object() seems to fetch the old object.
Why this happens needs further investigation.
2022-09-06 18:09:25 +01:00
Tusooa Zhu
c6f5bae654 Expose history and source apis to anon users 2022-09-06 18:08:00 +01:00
Tusooa Zhu
a5fb36ed91 Fix incorrectly cached content after editing 2022-09-06 18:08:00 +01:00
Tusooa Zhu
a0681391a1 Return the corresponding object id in attachment view 2022-09-06 18:08:00 +01:00
Tusooa Zhu
a9038093ba Add object id to uploaded attachments 2022-09-06 18:08:00 +01:00
Tusooa Zhu
f7c722c3f7 Lint 2022-09-06 18:08:00 +01:00
Tusooa Zhu
118a94d22a Return update notification in mastodon api 2022-09-06 18:08:00 +01:00
Tusooa Zhu
fa870c7188 Create Update notifications 2022-09-06 18:08:00 +01:00
Tusooa Zhu
803d8ed75c Expose content type of status sources 2022-09-06 18:08:00 +01:00
Tusooa Zhu
6431bb9bd2 Fix SideEffectsTest 2022-09-06 18:08:00 +01:00
Tusooa Zhu
c41f27c248 Show edited_at in MastodonAPI/show 2022-09-06 18:08:00 +01:00
Tusooa Zhu
a762184cfd Test that own edits are streamed 2022-09-06 18:08:00 +01:00
Tusooa Zhu
75dad5229b Stream out edits 2022-09-06 18:07:59 +01:00
Tusooa Zhu
211b766bb3 Inject history when object is refetched 2022-09-06 18:07:03 +01:00
Tusooa Zhu
ff9bebeeb3 Strip internal fields in formerRepresentation 2022-09-06 18:07:03 +01:00
Tusooa Zhu
40f67954ac Implement mastodon api for editing status 2022-09-06 18:07:03 +01:00
Tusooa Zhu
3f186180ec Implement viewing source 2022-09-06 18:07:02 +01:00
Tusooa Zhu
5fe133fbc9 Implement mastodon api for showing edit history 2022-09-06 18:06:25 +01:00
Tusooa Zhu
c94b86683a Allow updating polls 2022-09-06 18:04:08 +01:00
Tusooa Zhu
11c7cf3010 Record edit history for Note and Question Updates 2022-09-06 18:04:08 +01:00
Tusooa Zhu
d941cd1afe Handle Note and Question Updates 2022-09-06 18:04:08 +01:00
Tusooa Zhu
1d648c1f0d Allow Updates by every actor on the same origin 2022-09-06 18:04:08 +01:00
6c80977b06 turn inlineQuotePolicy on by default
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-09-05 17:22:33 +01:00