aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma
AgeCommit message (Collapse)Author
2022-08-10Fix Varnish 7 support by ensuring Media Preview Proxy fetches headers with a ↵Mark Felder
capitalized HEAD verb
2022-08-10CreateGenericValidator: fix reply context fixingHélène
Incoming Pleroma replies to a Misskey thread were rejected due to a broken context fix, which caused them to not be visible until a non-Pleroma user interacted with the replies. This fix properly sets the post-fix object context to its parent Create activity as well, if it was changed.
2022-08-10StatusView: implement pleroma.context fieldHélène
This field replaces the now deprecated conversation_id field, and now exposes the ActivityPub object `context` directly via the MastoAPI instead of relying on StatusNet-era data concepts.
2022-08-09Update api spec to reflect OAuth scope changeTusooa Zhu
2022-08-09StatusView: clear MSB on calculated conversation_idHélène
This field seems to be a left-over from the StatusNet era. If your application uses `pleroma.conversation_id`: this field is deprecated. It is currently stubbed instead by doing a CRC32 of the context, and clearing the MSB to avoid overflow exceptions with signed integers on the different clients using this field (Java/Kotlin code, mostly; see Husky and probably other mobile clients.) This should be removed in a future version of Pleroma. Pleroma-FE currently depends on this field, as well.
2022-08-09CommonFields: remove context_idHélène
2022-08-09Object: remove context_id fieldHélène
30 to 70% of the objects in the object table are simple JSON objects containing a single field, 'id', being the context's ID. The reason for the creation of an object per context seems to be an old relic from the StatusNet era, and has only been used nowadays as an helper for threads in Pleroma-FE via the `pleroma.conversation_id` field in status views. An object per context was created, and its numerical ID (table column) was used and stored as 'context_id' in the object and activity along with the full 'context' URI/string. This commit removes this field and stops creation of objects for each context, which will also allow incoming activities to use activity IDs as contexts, something which was not possible before, or would have been very broken under most circumstances. The `pleroma.conversation_id` field has been reimplemented in a way to maintain backwards-compatibility by calculating a CRC32 of the full context URI/string in the object, instead of relying on the row ID for the created context object.
2022-08-09Make backups require its own scopeTusooa Zhu
2022-08-08Treat containment failure as cancel in ReceiverWorkerTusooa Zhu
2022-08-06Treat MRF rejects as success in Oban workerTusooa Zhu
2022-08-03bugfix/follow-state (#104)floatingghost
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/104
2022-08-02Use actor_types() to determine whether the Update is for userTusooa Zhu
2022-08-02Merge branch 'from/upstream-develop/tusooa/2871-fix-local-public' into 'develop'Haelwenn
local only fixes Closes #2871 See merge request pleroma/pleroma!3660
2022-08-02Merge branch 'from/upstream-develop/tusooa/backup-without-email' into 'develop'Haelwenn
Allow users to create backups without providing email address See merge request pleroma/pleroma!3665
2022-07-31Merge branch 'develop' into 'from/develop/tusooa/emit-move'tusooa
# Conflicts: # CHANGELOG.md # test/pleroma/user_test.exs
2022-07-31Use `duration` param for mute expiration durationmarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-28Merge branch 'fix/proper-emoji-qualification' into 'develop'Haelwenn
Emoji: implement full-qualifier using combinations See merge request pleroma/pleroma!3709
2022-07-28Merge branch 'from/upstream-develop/tusooa/2384-pagination' into 'develop'Haelwenn
Make mutes and blocks behave the same as other lists Closes #2384 See merge request pleroma/pleroma!3693
2022-07-27Emoji: apply recommended tail call changesHélène
Behavior matches previous code. Co-authored-by: Tusooa Zhu <tusooa@kazv.moe>
2022-07-26Emoji: split qualification variation into a moduleHélène
2022-07-25EmojiReactValidator: use new qualification methodHélène
2022-07-25Emoji: implement full-qualifier using combinationsHélène
This implements fully_qualify_emoji/1, which will return the fully-qualified version of an emoji if it knows of one, or return the emoji unmodified if not. This code generates combinations per emoji: for each FE0F, all possible combinations of the character being removed or staying will be generated. This is made as an attempt to find all partially-qualified and unqualified versions of a fully-qualified emoji. I have found *no cases* for which this would be a problem, after browsing the entire emoji list in emoji-test.txt. This is safe, and, sadly, most likely the sanest too.
2022-07-24EmojiReactValidator: fix emoji qualificationHélène
Tries fully-qualifying emoji when receiving them, by adding the emoji variation sequence to the received reaction emoji. This issue arises when other instance software, such as Misskey, tries reacting with emoji that have unqualified or minimally qualified variants, like a red heart. Pleroma only accepts fully qualified emoji in emoji reactions, and refused those emoji. Now, Pleroma will attempt to properly qualify them first, and reject them if checks still fail. This commit contains changes to tests proposed by lanodan. Co-authored-by: Haelwenn <contact+git.pleroma.social@hacktivis.me>
2022-07-24Make AntiLinkSpamPolicy history-awareTusooa Zhu
2022-07-24Make HashtagPolicy history-awareTusooa Zhu
2022-07-23Make NoEmptyPolicy work with UpdateTusooa Zhu
2022-07-23Make NormalizeMarkup history-awareTusooa Zhu
2022-07-23Make NoPlaceholderTextPolicy history-awareTusooa Zhu
2022-07-23Make MediaProxyWarmingPolicy history-awareTusooa Zhu
2022-07-23Make ForceMentionsInContent history-awareTusooa Zhu
2022-07-23Make EnsureRePrepended history-awareTusooa Zhu
2022-07-23Make MRF Keyword history-awareTusooa Zhu
2022-07-23Merge branch 'mute-expiration' into 'develop'tusooa
MastoAPI: Show mutes expiration date See merge request pleroma/pleroma!3682
2022-07-22Revert "Merge branch 'fix/emoji-react-qualification' into 'develop'"Haelwenn
This reverts merge request !3684
2022-07-22AttachmentValidator: fix_media_type/1 fallback to application/octet-streamHaelwenn (lanodan) Monnier
2022-07-22ArticleNotePageValidator: Fix when attachments are a Map (ie. owncast)Haelwenn (lanodan) Monnier
2022-07-21Merge branch 'birthday_fix' into 'develop'tusooa
Allow to unset birthday See merge request pleroma/pleroma!3702
2022-07-21Merge branch 'fix/emoji-react-qualification' into 'develop'Haelwenn
EmojiReactValidator: fix emoji qualification See merge request pleroma/pleroma!3684
2022-07-21Merge remote-tracking branch 'upstream/develop' into HEADTusooa Zhu
2022-07-20Merge branch 'resolve/notice-compatibility-routes-nginx' into 'develop'Haelwenn
Document way to do notice compatibility routes with Nginx reverse-proxy, fixes #2900 Closes #2900 See merge request pleroma/pleroma!3701
2022-07-17Allow to unset birthdaymarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-17Merge branch 'from/upstream-develop/tusooa/config-translatable' into 'develop'Haelwenn
Translatable config descriptions Closes pleroma-meta#65 See merge request pleroma/pleroma!3695
2022-07-16Document way to do notice compatibility routes with Nginx reverse-proxy insteadSean King
2022-07-17Merge branch 'notification_types' into 'develop'tusooa
MastoAPI: Use `types` for filtering notifications See merge request pleroma/pleroma!3648
2022-07-16Use :utc_datetimemarcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-16Implement settings apiTusooa Zhu
2022-07-14Pass in msgctxt for config translation stringsTusooa Zhu
2022-07-14Allow higher amount of restarts for Pleroma.Repo during testingfloatingghost
This was done by floatingghost as part of a bigger commit in Akkoma. See <https://akkoma.dev/AkkomaGang/akkoma/src/commit/37ae047e1652c4089934434ec79f393c4c839122/lib/pleroma/application.ex#L83>. As explained in <https://ihatebeinga.live/objects/860d23e1-dc64-4b07-8b4d-020b9c56cff6> > there are so many caches that clearing them all can nuke the supervisor, which by default will become an hero if it gets more than 3 restarts in <5 seconds And further down the thread > essentially we've got like 11 caches (https://akkoma.dev/AkkomaGang/akkoma/src/commit/37ae047e1652c4089934434ec79f393c4c839122/lib/pleroma/application.ex#L165) > then in test we fetch them all (https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/test/support/data_case.ex#L50) and call clear on them > so if this clear fails on any 3 of them, the pleroma supervisor itself will die How it fails? > idk maybe cachex dies, maybe :ets does a weird thing > it doesn't log anything, it just consistently dies during cache clearing so i figured it had to be that > honestly my best bet is locksmith and queuing > https://github.com/whitfin/cachex/blob/master/lib/cachex/actions/clear.ex#L26 > clear is thrown into a locksmith transaction > locksmith says > >If the process is already in a transactional context, the provided function will be executed immediately. Otherwise the required keys will be locked until the provided function has finished executing. > so if we get 2 clears too close together, maybe it locks, then doesn't like the next clear?
2022-07-13Fix compile errorTusooa Zhu
2022-07-13Make admin api use translated config descriptionsTusooa Zhu