Thomas Citharel
57fac37347
Support CSP report_uri, report_to and the Report-To and Reporting-Endpoints headers
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-11-04 10:55:26 +01:00
Thomas Citharel
a1726fc12e
Add sha-256 hash for toggling dark theme code and remove inlined phoenix digest
...
Follow-up to !1300
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-11-02 11:36:32 +01:00
Thomas Citharel
470a3e594b
Correctly escape user-defined names in emails
...
Closes #1151
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-10-31 14:30:40 +01:00
Thomas Citharel
082435129e
Fix tests after CLDR upgrade
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-10-27 16:08:15 +02:00
Thomas Citharel
c9fffca046
Always lowercase the emails before trying to reset password
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-10-18 18:37:39 +02:00
Thomas Citharel
6a9fba7db8
Fix tests for CI
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-09-21 08:32:42 +02:00
Thomas Citharel
4213e1f1ec
Send activity recap emails outside of the transaction
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-11 11:24:20 +02:00
Thomas Citharel
1eb111f52f
Make sure activity notification recaps can't be sent multiple times
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-10 13:15:11 +02:00
Thomas Citharel
5bc63185fd
Add a CLI command to delete actors
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-09 18:27:51 +02:00
Thomas Citharel
7a6a013d93
Make sure users can't create profiles or groups with non-valid patterns
...
Closes #1068
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-06 20:01:05 +02:00
Thomas Citharel
0b49021f8b
Fix admin notification e-mails from instance follow for Mastodon
...
instances
Show an appropriate name in the body of the mail
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-06 16:36:04 +02:00
Thomas Citharel
63a23748ac
Improve test coverage
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-03 12:58:07 +02:00
Thomas Citharel
bf7ebfd989
Test refreshing instances does not update self relay actor
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-02 13:15:14 +02:00
Thomas Citharel
f23f438763
Add test for the hashtag special cases
...
- Test that same hashtags with different casing are taken only once into
account
- Test that too long hashtags are not extracted from description
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-04-21 17:13:21 +02:00
Thomas Citharel
00f4c0b02c
Make sure remote Update activities can't affect local actors other than
...
Groups
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-04-20 16:18:10 +02:00
Thomas Citharel
e3adc0684f
Make FrontEndAnalytics provide CSP configuration
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-04-06 19:56:09 +02:00
Thomas Citharel
da2254089c
Make sure suspended actors are not in the AP cache anymore
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-04-06 16:54:00 +02:00
Thomas Citharel
4b9a38b2a7
Merge branch 'email-spam' into 'main'
...
Move mailer from Bamboo to Swoosh
Closes #491
See merge request framasoft/mobilizon!1203
2022-04-05 11:21:24 +00:00
Thomas Citharel
e841fb6fbb
Move mailer from Bamboo to Swoosh
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-04-05 12:38:02 +02:00
Thomas Citharel
d2864a22d9
Allow to exclude stale actors from group search (one week without refreshment)
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-04-04 15:42:16 +02:00
Thomas Citharel
2bdce8b2fc
Handle address is invalid while rendering event preview
...
Closes #996
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-04-01 15:01:57 +02:00
Thomas Citharel
c56b898379
Fix incoming Accept activities from participations we don't already have
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-03-31 11:24:22 +02:00
Thomas Citharel
3c8a2a1313
Add details of object in exception when AP object as no
...
actor/attributedTo
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-03-31 10:49:15 +02:00
Thomas Citharel
4983f2d695
Fix tests after category changes
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-03-29 09:29:15 +02:00
Thomas Citharel
f5bdedf789
Introduce event categories
...
Closes #1056
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-03-28 17:42:59 +02:00
Thomas Citharel
91f2b2bd6d
Format GraphQL block in test
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-03-23 15:22:56 +01:00
Thomas Citharel
e4467ec4ad
Fix timeouts in tests by removing async: true for DB tests
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-03-23 15:22:14 +01:00
Thomas Citharel
a461674f9d
Make GraphQL parameters strict following Absinthe 1.7 validating
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-03-23 12:35:26 +01:00
Thomas Citharel
3d50f2d90d
Update pattern matching for Oban.drain_queue following update
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-03-23 12:35:26 +01:00
Thomas Citharel
c8735e5837
Fix parsing links with hashtag characters
...
Closes #1008
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-01-18 12:46:33 +01:00
Thomas Citharel
6e5061250c
Improve admin views (2)
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-01-17 15:53:24 +01:00
Thomas Citharel
26b1ea401a
Fix various issues reported by Dializer
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-01-17 14:49:46 +01:00
Thomas Citharel
1319985047
Rename Mobilizon.Actors.is_following/2 to check_follow/2
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-01-17 14:41:03 +01:00
Thomas Citharel
e9601fac72
Remove gancio fixture picture as the server is down
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-12-22 09:51:14 +01:00
Thomas Citharel
ba097c736e
Improve handling of media file deletion
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-12-15 12:59:56 +01:00
Thomas Citharel
1bfff235f3
Don't sign fetches to instance actor when refreshing their keys
...
Closes #963
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-29 11:07:44 +01:00
Thomas Citharel
51afec1856
Fix new credo warnings
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-26 14:47:10 +01:00
Thomas Citharel
4a2fe900cd
Refactor and test Mobilizon.Federation.ActivityPub.Utils.get_actor/1
...
Raise exception when object contains no actor. Friendica seems to send an Update activity with no actor
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-24 17:31:47 +01:00
Thomas Citharel
e8da59f4a5
Cleanup clean_orphan_test.exs
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-20 18:36:26 +01:00
Thomas Citharel
d7fd30f8e6
Federation fixes
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-19 19:25:49 +01:00
Thomas Citharel
d291a83cc9
Warn when registering with email containing uppercase characters
...
Closes #884 and #803
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-16 11:38:17 +01:00
Thomas Citharel
be1664ec85
Improve sending pending participation notifications
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-15 16:59:40 +01:00
Thomas Citharel
3f9e1c8e19
Remove exvcr dependency
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-15 08:48:28 +01:00
Thomas Citharel
55af776df9
Improve group refreshment and fixed date signature generation
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-14 16:28:27 +01:00
Thomas Citharel
6d599441a9
Allow group members to access group drafts
...
Closes #843
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-13 19:57:14 +01:00
Thomas Citharel
6eba531c89
Allow group admins to moderate new members
...
Closes #881
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-12 17:17:05 +01:00
Thomas Citharel
38a3ffc19f
Send event creation and event update notifications in a background task
...
The event update notification is made unique so that repeated changes
only trigger one notificate every 30 minutes
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-11 16:29:38 +01:00
Thomas Citharel
c15123e5ea
Add tests for Gancio compatibility
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-10 20:44:51 +01:00
Thomas Citharel
2401abedb5
Include organizer actor in icalendar export
...
Closes #907
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-09 11:50:35 +01:00
Thomas Citharel
1bd32b4e36
Merge branch '1.3.x'
2021-11-08 09:04:54 +01:00
Thomas Citharel
4de39d5850
Improve searching for group actors
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-06 10:50:48 +01:00
Thomas Citharel
75fbcb985c
Only send Tombstone with Delete activity, not the object itself
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-04 09:04:59 +01:00
Mayel
475c72597e
ignore incoming federated private comments
2021-11-03 14:27:19 +01:00
Mayel
8cb7df16d0
test case for incoming private comments
2021-11-03 14:27:19 +01:00
Thomas Citharel
2b3a0f19b9
Fix backend tests
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-03 10:14:43 +01:00
Thomas Citharel
44e8ac7e9a
Add support for GraphQL handling of group follows
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-02 19:50:21 +01:00
Thomas Citharel
3b63c2928e
Add more metadata elements
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-10-22 09:41:36 +02:00
Thomas Citharel
9b4a92077f
Add TimezoneDetectorTest
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-10-19 12:18:03 +02:00
Thomas Citharel
f24ec89408
Fix event notification tests
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-10-18 11:14:46 +02:00
Thomas Citharel
4de78f58e0
Allow anonymous participants to have timezone metadata
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-10-18 11:13:35 +02:00
Thomas Citharel
b383d11f51
Fix backend tests
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-10-12 08:49:12 +02:00
Thomas Citharel
dee7c58449
Spec fixes
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-10-11 15:14:54 +02:00
Thomas Citharel
f4284e1d3a
Remove unused functions
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-10-05 16:05:51 +02:00
Thomas Citharel
0c667b13ae
Export participants to different formats
...
* CSV
* PDF (requires Python dependency `weasyprint`)
* ODS (requires Python dependency `pyexcel_ods3`)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-10-05 10:52:55 +02:00
Thomas Citharel
5dd24e1c9e
Allow to change an user's password through the users.modify mix task
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-10-04 17:38:37 +02:00
Thomas Citharel
81c319bdf8
Adapt to new Oban result
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-09-29 20:28:03 +02:00
Thomas Citharel
b5d9b82bdd
Refactor Mobilizon.Federation.ActivityPub and add typespecs
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-09-29 16:31:11 +02:00
Thomas Citharel
41f086e2c9
Spec improvements
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-09-27 09:42:12 +02:00
Thomas Citharel
55e7696230
Absinthe middleware actor provider
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-09-27 09:42:11 +02:00
Thomas Citharel
1893d9f55b
Various refactoring and typespec improvements
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-09-26 17:52:24 +02:00
Thomas Citharel
75e254d8b4
Actor suspension refactoring
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-09-26 17:52:23 +02:00
Thomas Citharel
e9e12500dc
Fix tags autocomplete
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-09-26 17:52:21 +02:00
Thomas Citharel
de047c8939
Various typespec and compilation improvements
...
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-09-26 17:52:20 +02:00
Thomas Citharel
264b94e30c
Search should return only groups, don't show user profiles
...
Closes #845
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-23 13:34:40 +02:00
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
241710807c
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-23 10:37:20 +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