Commit Graph

13 Commits

Author SHA1 Message Date
Hélène bb02ee99f5
CommonFixes: more predictable context generation
`context` fields for objects and activities can now be generated based
on the object/activity `inReplyTo` field or its ActivityPub ID, as a
fallback method in cases where `context` fields are missing for incoming
activities and objects.
2022-08-15 01:46:55 +02:00
Hélène f3e061c964
Object: remove context_id field
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-09 20:10:43 +02:00
Sean King 17aa3644be
Copyright bump for 2022 2022-02-25 23:11:42 -07:00
Haelwenn (lanodan) Monnier c839078a75
ObjectValidators.{Announce,EmojiReact,Like}: Fix context, actor & addressing 2021-06-09 04:23:02 +02:00
Haelwenn (lanodan) Monnier 96212b2e32
Fix addressing 2021-04-05 19:19:12 +02:00
Haelwenn (lanodan) Monnier 641184fc7a
recipients fixes/hardening for CreateGenericValidator 2021-04-05 19:19:11 +02:00
Haelwenn (lanodan) Monnier c944932674
Pipeline Ingestion: Note 2021-04-05 19:19:11 +02:00
Haelwenn (lanodan) Monnier e2a3365b5c
ObjectValidator.CommonFixes: Introduce fix_objects_defaults and fix_activity_defaults 2021-04-05 19:19:11 +02:00
Haelwenn (lanodan) Monnier c4439c630f
Bump Copyright to 2021
grep -rl '# Copyright © .* Pleroma' * | xargs sed -i 's;Copyright © .* Pleroma .*;Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>;'
2021-01-13 07:49:50 +01:00
Haelwenn (lanodan) Monnier 846b59ccb0
Pipeline Ingestion: Video 2020-09-11 01:39:39 +02:00
Haelwenn (lanodan) Monnier b960cede9a
common_fixes: Force inserting context and context_id 2020-09-01 08:35:00 +02:00
Haelwenn (lanodan) Monnier 2f8c3c842d
common_fixes: Remove Utils.make_date call 2020-08-18 02:24:48 +02:00
Haelwenn (lanodan) Monnier c9d6638461
common_fixes: Get fixes common from Audio and Question 2020-08-18 02:24:48 +02:00