Commit Graph

205 Commits

Author SHA1 Message Date
Thomas Citharel
63e7807f0d
Fix group map display
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-13 19:57:13 +01:00
Thomas Citharel
18cd7c11f1
Fix error when determining audience for Discussion
Closes #873

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-13 11:46:25 +01:00
Thomas Citharel
f287b9126e
Improve the AP representation and move endpoints to property
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-12 17:17:05 +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
8250d34597
Debug log the output of an Create Event error
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-10 20:44:52 +01:00
Thomas Citharel
aaf9c2c931
Refactor fetching medias from event attachements
Use first attachement Document if none has the Banner name

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-10 20:44:51 +01:00
Thomas Citharel
6822cfabf1
Add a default name for media if none is specified in AP
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-10 20:44:51 +01:00
Thomas Citharel
5c7067b22b
Send notification emails to followers and members when a group publishes
a new event

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-10 16:36:32 +01:00
Thomas Citharel
4fc044c595
Expose group physical address to AP
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-06 10:28:08 +01:00
Thomas Citharel
52ea2ff579
Add relay followers to recipients when sending public entity
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-04 09:08:05 +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
5e64d0515e
format 2021-11-03 14:27:19 +01:00
Mayel
475c72597e
ignore incoming federated private comments 2021-11-03 14:27:19 +01:00
Thomas Citharel
6cdc68e1a8
Allow to fetch Application actors
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-11-02 19:50:25 +01:00
Thomas Citharel
4ca831a5b3
Federate timezone
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-10-18 11:12:18 +02:00
Thomas Citharel
d58ca5743d
Add timezone handling
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-10-11 17:37:17 +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
98b840190d
Refactor HTTP signatures
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-09-30 15:58:12 +02:00
Thomas Citharel
c924975d40
Fix a typespec issue
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-09-29 18:22:47 +02:00
Thomas Citharel
c5624ae33d
Fix an issue when leaving a group
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-09-29 18:22:32 +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
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
de047c8939
Various typespec and compilation improvements
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-09-26 17:52:20 +02:00
Thomas Citharel
cc197d7638
Fix federating geo coordinates
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-09-06 12:46:29 +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
Thomas Citharel
f204141262
Content is visible only @ap_public is in "to"
Closes #711

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-16 11:16:45 +02:00
Thomas Citharel
34e2c4f310
Fix geocoordinates mixmatch
Closes #828

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-16 10:23:16 +02:00
Thomas Citharel
e05735265b
Fix remote group moderators managing event participations
Closes #827

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-13 12:24:30 +02:00
Thomas Citharel
cfffe5b248
Better handle deleted comments
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-10 20:49:46 +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
a5822d179c
Fix editing event from original instance on a group event
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
e6c05c481a
Fix variables names
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:22 +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
ecfcc4fe83
Don't preload just public events, group draft can be fetched as well
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:20 +02:00
Thomas Citharel
505b16611b
Fix event local detection
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:20 +02:00
Thomas Citharel
20ff0a7f6c
Refactor Mobilizon.Federation.ActivityPub.Permission to handle
permissions

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:19 +02:00
Thomas Citharel
c394f2cc5a
Use Permission module to check if user can have access to resource
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:18 +02:00
Thomas Citharel
0995043d04
Add the :role_needed_to_access permission check and refactor
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:17 +02:00
Thomas Citharel
867e88481d
Fix getting visibility from AP Post
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-01 10:51:17 +02:00
Thomas Citharel
7ec6f158ec
Add wrapper to Sentry to not load it when not configured
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-27 15:21:33 +02:00
Thomas Citharel
725a3c8b9e
Fix accessing outdated page of group
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-16 11:27:14 +02:00
Thomas Citharel
19792abd41
Better handling of bad host-meta responses
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-10 15:18:12 +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
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
58bffc5c66
WIP notification settings
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-04 13:33:25 +02:00
Thomas Citharel
f84cc299ba
Log when a follow request is auto-accepted
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-04 13:33:16 +02:00
Thomas Citharel
4100b2f962
Refresh profiles in a background task
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-04 13:33:16 +02:00
Thomas Citharel
2692d32c5e
Add url to error log
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-29 10:23:47 +02:00
Thomas Citharel
614ead1777
Transmogrifier event create Handle any type of error
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-28 18:19:09 +02:00
Thomas Citharel
4fd6ecf53d
Improve AP error handling
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-28 18:06:17 +02:00
Thomas Citharel
8185fcd0bd
Refresh after invite accept only if remote group
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-26 10:17:57 +02:00
Thomas Citharel
ed52474b51
Disable sentry logging unknown activities
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-26 09:21:00 +02:00
Thomas Citharel
eaadf261ac
Handle actor fetch issues better
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-23 09:25:57 +02:00
Thomas Citharel
280f461ba7
Refactor the ActivityPub module
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-22 19:29:47 +02:00
Thomas Citharel
67b537f380
Fix sentry issues
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-22 19:29:46 +02:00
Thomas Citharel
cb4a801519
Small fixes
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-20 17:10:34 +02:00
Thomas Citharel
d98e68203e
Handle sending mail more properly
With custom sentry reporting issues

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-20 15:02:24 +02:00
Thomas Citharel
53fd77f5da
Fixes discussions being sent to followers instead of members
Closes #681

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-16 16:01:10 +02:00
Thomas Citharel
fb614cf877
Handle AP fetch issues properly
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-12 12:01:51 +02:00
Thomas Citharel
cbf772f282
Add a check for valid URI before fetching it in AP Client
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-12 12:01:50 +02:00
Thomas Citharel
b34958d3af
Refactor Webfinger module, use XRD host-meta to find webfinger endpoint
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-12 12:01:49 +02:00
Thomas Citharel
bd53bfc46b
Fix usage of is_bitstring instead of is_binary
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-08 16:41:49 +02:00
Thomas Citharel
fa99c09c57
Use tasks to process refreshing elements
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-04-08 10:39:01 +02:00
Thomas Citharel
076c14b54e
Don't auto-approve instance follows
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-03-30 09:12:53 +02:00
Thomas Citharel
e6189390ac
Fix creating discussion with title containing only spaces
Also sanitize first comment

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-03-24 15:47:03 +01:00
Thomas Citharel
6fe22ac6ed
Handle ActivityPub Fetcher returning text that's not JSON
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-03-16 16:50:43 +01:00
Thomas Citharel
1f926902aa
Add comments under events to activities
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-03-10 17:40:55 +01:00
Thomas Citharel
6a23f03b70
Federate draft status
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-03-08 15:58:54 +01:00
Thomas Citharel
3bffabccb6
Only federate group draft posts to members
Closes #615

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-03-08 13:43:53 +01:00
Thomas Citharel
03824b898c
Get membership status only for the current group
Closes #575

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-03-05 11:23:17 +01:00
Thomas Citharel
e70b21ae79
Only refresh groups that need updating
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-03-02 14:48:59 +01:00
Thomas Citharel
3fe64a4389
Introduce the group activity section
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-02-26 09:37:06 +01:00
Thomas Citharel
177341b491
Fix events & posts not being sent to group followers
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-02-04 16:48:42 +01:00
Thomas Citharel
a4545bcf67
Exclude persons from being followed
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-01-24 16:17:16 +01:00
Thomas Citharel
4fbdc94e7c
Fix following groups + Add interface to manage followers
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-01-22 11:52:52 +01:00
Thomas Citharel
12d2ab669d
Improve Member federation
Federate the member ID instead of the person ID

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-01-18 16:19:07 +01:00
Cédric Van Rompay
08df0be1b7 update location of litepub JSON-LD context
previous URL returns "HTTP 301 Moved Permanently"
2020-12-19 13:38:04 +01:00
Thomas Citharel
f7d064c022
Handle Hubzilla posts better
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-12-17 17:32:12 +01:00
Thomas Citharel
d1472d94de
Expose posts media through AP
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-12-16 09:54:56 +01:00
Thomas Citharel
9b27e70eb0
Save remote profiles avatars & banners locally
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-12-15 17:17:42 +01:00
Thomas Citharel
06050c9cd6
Fix leftover
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-12-01 17:42:07 +01:00
Thomas Citharel
6d8710f0fe
Send the membership emails in the correct language
And send them as well if the member is on the same instance 🙈

Close #472

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-12-01 10:21:07 +01:00
Thomas Citharel
c9457fe0d3
Track usage of media files and add a job to clean them
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-11-26 17:53:33 +01:00
Thomas Citharel
19c9cf5e16
Fix refreshing groups
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-11-20 11:44:00 +01:00
Thomas Citharel
44559a71ee
Remove duplicate @doc blocs
Elixir 11 notifies this a lot

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-11-06 15:48:05 +01:00
Thomas Citharel
7c11807c14
Allow to join an open group
Also:

* Refactor interacting with a remote event so that you can interact with
  a remote group as well
* Add a setting for group admins to pick between an open and invite-only
  group
* Fix new groups without posts/todos/resources/events/conversations URL
  set
* Repair local groups that haven't got their
  posts/todos/resources/events/conversations URL set
* Add a scheduled job to refresh remote groups every hour
* Add a user setting to pick when to receive notifications when there's
  new members to approve (will be used when this feature is available)
* Fix pagination for members

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-11-06 15:19:36 +01:00
Thomas Citharel
6cda3c0a94
Don't allow remote comments to be inserted if parent event doesn't allow it
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-11-02 10:49:58 +01:00
prichier
751b72a434 Fix Mix.env use in prod app & MR threads 2020-10-31 02:42:06 +01:00