Commit Graph

9 Commits

Author SHA1 Message Date
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 23161526d4 object_validators: Group common fields in CommonValidations
Notes:
- QuestionValidator didn't have a :name field but that seems like a mistake
- `_fields` functions can't inherit others because of some Validators
- bto/bcc fields were absent in activities, also seems like a mistake
  (Well IIRC we don't or barely support bto/bcc anyway)
2021-10-10 02:50:06 +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 7ebfe89900
object_validators: Mark validate_data as private 2021-04-01 14:18:41 +02:00
Haelwenn (lanodan) Monnier 9015df2229
TagValidator: New 2021-04-01 14:18:40 +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 a142da3e4f
Add new Emoji Ecto.Type and fix emoji in Question 2020-09-01 08:34:57 +02:00
Haelwenn (lanodan) Monnier 36c125a071
Pipeline Ingestion: Event 2020-08-20 21:49:26 +02:00