Commit graph

368 commits

Author SHA1 Message Date
Thomas Citharel 24ff99ffaf
Search should return only groups, don't show user profiles
Closes #845

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-23 11:17:32 +02:00
Thomas Citharel ab843dff4c
Fixed deduplicated files from orphan media being deleted as well
Happens when a file is uploaded, then orphaned, and a similar file is
used somewhere. The CleanMedia job service didn't consider that case

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-22 16:17:20 +02:00
Thomas Citharel d577b07c6e
Introduce event language detection
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-20 18:01:29 +02:00
Norbert Szulc f8f53edb76
Add test 2021-08-16 16:23:13 +02:00
Thomas Citharel 6f9db37ca3
Fix checking origin from a tombstone
When comparing an activity with their origin, only compare the ID
directly, as Tombstones don't have actors anymore

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-10 20:49:45 +02:00
Thomas Citharel 56861d6483
Fix audience for comments under a remote event from group
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-10 12:46:44 +02:00
Thomas Citharel d3a05b5568
Federate metadata
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-10 12:46:44 +02:00
Thomas Citharel 783486a366
Support denying registration based on email or domain
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-08 19:56:33 +02:00
Thomas Citharel 51cd066a14
Add resizing filter to make sure pictures are not too big
Closes #810

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-05 16:10:03 +02:00
Thomas Citharel 93ba408671
Improve group profile metadata
* Add canonical link
* Add link alternate to application/activity+json representation
* add robots noindex on remote profiles

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-04 10:49:02 +02:00
Thomas Citharel ac9587b9d1
Don't assert file size in upload factory
Since it can be tested in different environments (obsolete systems,
docker, different ImageMagick versions…), file optimization
might get different results depending on system

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-04 10:49:02 +02:00
Thomas Citharel cceb083ad7
Improve error reporting and add test
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-03 12:15:54 +02:00
Thomas Citharel 25789f8f6d
Add more events tests
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-02 11:45:50 +02:00
Thomas Citharel 4b864ba423
Allow to use inline "Join" when processing an Accept
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-02 11:45:48 +02:00
Thomas Citharel 099b85e9a9
Refactor audience to introduce maybe_add_followers/2
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:23 +02:00
Thomas Citharel ecf7bb1fef
Various event AP converter changes and add tests
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:22 +02:00
Thomas Citharel caf9493a00
Various changes needed for AP refactor
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:22 +02:00
Thomas Citharel 78dc7613bc
Refactor Mobilizon.Federation.ActivityPub.Audience and add tests
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:21 +02:00
Thomas Citharel 221dd0609e
Fix accessing group draft post
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:21 +02:00
Thomas Citharel 011128b0fb
Make sure draft events are not selected in search
Closes https://framagit.org/framasoft/mobilizon/-/issues/807

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:21 +02:00
Thomas Citharel acd921432f
Refactor checking permissions when managing events and tests
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:21 +02:00
Thomas Citharel 52fe274c5a
Allow to pass file uploads to AbsintheHelpers.graphql_query/2
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:21 +02:00
Thomas Citharel a670a7d7a7
Fix and improve language handling
- Refactor plugs to detect and set language
- Translate ecto validation errors
- Use Gettext directly, not Mobilizon.Web.Gettext
- Set the language in the <html> attribute according to the one loaded
  on front-end

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-07-27 20:11:56 +02:00
Thomas Citharel ae25cba97a
Use correct default language when no Accept-Language is set
Closes #792

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-07-22 17:01:34 +02:00
Thomas Citharel fa8cae681f
Add possibility to create users with provider (such as LDAP)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-07-22 15:09:12 +02:00
Thomas Citharel 11e75eaf66
Add the possibility to create profiles and groups from CLI
- Create an actor at the same time when creating an user
- or create either a profile and attach it to an existing user
- or create a group and set the admin to an existing profile

Closes #785

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-07-20 18:29:38 +02:00
Thomas Citharel b196719238
Remove unsafe-inline from CSP
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-07-02 09:46:38 +02:00
Thomas Citharel e1eb0e9d16
Fix test issue after 57b71cb85a
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-29 11:20:34 +02:00
Thomas Citharel 5cdac95a85
Send announcement notifications to anonymous participants
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-27 18:16:34 +02:00
Thomas Citharel ed182e358b
Fix scheduler test
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-27 16:18:53 +02:00
Thomas Citharel 3ed25bab81
Send notifications to event organizer when new comment is posted
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-27 13:16:17 +02:00
Thomas Citharel 784c607c65
Send activity digests
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-26 16:09:02 +02:00
Thomas Citharel 7a6667bd3b
Make mentions send notifications
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-23 20:12:13 +02:00
Thomas Citharel 7bb8568504
Add an unique index on posts URLs
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-22 16:51:21 +02:00
Thomas Citharel 8caf1e302b
Add basic metadata to opengraph preview
Also refactor datetime & address utils

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-22 16:01:55 +02:00
Thomas Citharel a24e08a6de
Add blurhash support to backend
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-10 15:18:08 +02:00
Thomas Citharel 4169db1e73
Move from the mdillon postgis image to postgis/postgis
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-07 19:41:59 +02:00
Thomas Citharel a336e76aae
Run mix format on Elixir 12
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-07 16:49:43 +02:00
Thomas Citharel 901c88d741
Fix an AP test
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-07 11:06:59 +02:00
Thomas Citharel f100fce0da
Finally fix backend tests
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-04 16:32:26 +02:00
Thomas Citharel 71cecb5b2c
Fix tests
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-04 13:33:27 +02:00
Thomas Citharel 8d87cd12a9
Fix an activity test related to Notifier mock
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-04 13:33:27 +02:00
Thomas Citharel 96511ea4bc
Fix report resolver test
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-04 13:33:26 +02:00
Thomas Citharel f699efe109
Add the isAnnouncement comment property to test data
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-04 13:33:26 +02:00
Thomas Citharel d3164899f3
Fix tests
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-04 13:33:26 +02:00
Thomas Citharel 37c1790273
Test CommentActivity legacy notifications
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-04 13:33:25 +02:00
Thomas Citharel 57c07836aa
Add a test to LegacyNotifierBuilder
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-04 13:33:25 +02:00
Thomas Citharel 86c2512c62
WIP
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-04 13:32:05 +02:00
Thomas Citharel b0394fdb02
Use post picture as OGP picture if existing
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-05-19 11:35:19 +02:00
Thomas Citharel 9f4cc5d981
Fix ActivityPub test contacting dead server
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-05-18 17:56:49 +02:00