Commit graph

1040 commits

Author SHA1 Message Date
Maksim Pechnikov
fcf604fa43 added tests 2019-09-11 07:23:33 +03:00
Maksim Pechnikov
a31af93e1d added tests /activity_pub/transmogrifier.ex 2019-09-10 16:43:10 +03:00
minibikini
11e12b5761 Add Pleroma.Plugs.Cache 2019-09-09 18:53:08 +00:00
edbaf78176 Merge branch 'fix/read-inbox' into 'develop'
Fix `ActivityPubController.read_inbox/2`

Closes #1248

See merge request pleroma/pleroma!1649
2019-09-09 18:21:29 +00:00
Egor Kislitsyn
e0f84d0043 Fix ActivityPubController.read_inbox/2 2019-09-10 01:11:57 +07:00
Ivan Tashkinov
c3f00447af Merge remote-tracking branch 'remotes/upstream/develop' into 1149-oban-job-queue 2019-09-08 08:41:10 +03:00
Maksim Pechnikov
39f99dc6cd Merge branch 'develop' into support/tests 2019-09-07 22:13:43 +03:00
Ariadne Conill
5effb2cbca activitypub: help ecto build a better query for thread mute filtering
using an indexed value in thread_mute table helps ecto build a better query.
2019-09-06 23:11:26 +00:00
Maksim Pechnikov
ae506ca997 fix formatting 2019-09-04 21:40:53 +03:00
Maksim
e2011a667c Apply suggestion to lib/pleroma/web/activity_pub/utils.ex 2019-09-04 18:35:01 +00:00
Maksim
8306078de1 Apply suggestion to lib/pleroma/web/activity_pub/utils.ex 2019-09-04 17:31:14 +00:00
Maksim Pechnikov
a890451187 fetch_announcements -> take_announcements 2019-09-04 17:42:27 +03:00
Maksim Pechnikov
8cbad5500c add tests for activity_pub/utils.ex 2019-09-04 15:25:12 +03:00
Ivan Tashkinov
dd017c65a4 [#1149] Refactored Oban workers API (introduced enqueue/3). 2019-08-31 21:58:42 +03:00
Ivan Tashkinov
a90ea8ba15 [#1149] Addressed code review comments (code style, jobs pruning etc.). 2019-08-31 19:08:56 +03:00
Ivan Tashkinov
e890ea7e82 [#1149] Added Oban job for "activity_expiration". Merged remote-tracking branch 'remotes/upstream/develop' into 1149-oban-job-queue
# Conflicts:
#	config/config.exs
2019-08-31 14:25:43 +03:00
7853b3f17d Fix AntiFollowbotPolicy when trying to follow a relay 2019-08-30 00:38:03 +00:00
Haelwenn
d9d7765383 Merge branch 'fix-osada-follow' into 'develop'
Transmogrifier: Fix follow handling when the actor is an object.

Closes #1211

See merge request pleroma/pleroma!1604
2019-08-28 07:10:35 +00:00
Maksim
ffcd742aa0 Apply suggestion to lib/pleroma/web/activity_pub/activity_pub_controller.ex 2019-08-27 17:37:19 +00:00
lain
c30cc039e4 Transmogrifier: Use Containment.get_actor to get actors. 2019-08-27 12:22:30 -05:00
Maksim Pechnikov
00abe099cd added tests for ActivityPub.like\unlike 2019-08-27 16:21:03 +03:00
lain
3da65292b3 Transmogrifier: Fix follow handling when the actor is an object. 2019-08-26 14:34:52 -05:00
Maksim Pechnikov
654d291b6d update tests 2019-08-24 17:41:53 +03:00
Maksim Pechnikov
6062017493 put_resp_header("content-type", "application/activity+json") -> put_resp_content_type("application/activity+json") 2019-08-24 17:17:17 +03:00
Maksim Pechnikov
8dc6a6b210 fix /inbox for Relay 2019-08-22 22:48:07 +03:00
Maksim Pechnikov
399ca9133b fix test 2019-08-22 21:54:37 +03:00
Ivan Tashkinov
256ff09aa8 [#1149] Merge remote-tracking branch 'remotes/upstream/develop' into 1149-oban-job-queue
# Conflicts:
#	lib/pleroma/application.ex
#	lib/pleroma/scheduled_activity_worker.ex
#	lib/pleroma/web/federator/retry_queue.ex
#	lib/pleroma/web/oauth/token/clean_worker.ex
#	test/user_test.exs
#	test/web/federator_test.exs
2019-08-22 20:59:58 +03:00
Maksim Pechnikov
64bfb41c55 fixed unfollow for relay actor 2019-08-22 06:57:55 +03:00
lain
74f7f308f8 Merge branch 'fix/admin-api-user-deletion' into 'develop'
Fix deactivated user deletion

See merge request pleroma/pleroma!1546
2019-08-20 19:34:47 +00:00
lain
ef43016b2c Merge branch 'feature/custom-fields' into 'develop'
Add custom profile fields

See merge request pleroma/pleroma!1488
2019-08-20 12:44:14 +00:00
Maxim Filippov
5171aa5b4d Refactor check_actor_is_active 2019-08-19 20:36:25 +03:00
kaniini
18c8c8d176 Merge branch 'feature/hide-muted-threads-from-timeline' into 'develop'
Hide muted theads from home/public timelines unless `with_muted` is set

See merge request pleroma/pleroma!1575
2019-08-18 21:57:55 +00:00
rinpatch
a4a3e3becd Hide muted theads from home/public timelines unless with_muted is set 2019-08-15 17:37:30 +03:00
Maxim Filippov
ec969eec51 Merge branch 'develop' into 'fix/admin-api-user-deletion'
# Conflicts:
#   CHANGELOG.md
2019-08-14 22:45:32 +00:00
Maxim Filippov
2b94ae3b39 Do not check if actor is active when deleting a user 2019-08-15 01:35:29 +03:00
rinpatch
bd5ad0af78 Cache follow state 2019-08-15 00:47:30 +03:00
rinpatch
dc902ad3df Merge branch 'fix/http-signatures-post' into 'develop'
activitypub: publisher: add (request-target) to http signature when POSTing

See merge request pleroma/pleroma!1569
2019-08-14 19:16:52 +00:00
kaniini
1754f8ce6d Apply suggestion to lib/pleroma/web/activity_pub/publisher.ex 2019-08-14 19:05:44 +00:00
Ariadne Conill
5bb418a90d activitypub: publisher: add (request-target) to http signature when POSTing 2019-08-14 19:01:51 +00:00
Ariadne Conill
626e094589 MRF: fix up unserializable option lists in describe implementations 2019-08-14 18:54:17 +00:00
Ivan Tashkinov
8778c16dac Merge remote-tracking branch 'remotes/upstream/develop' into 1149-oban-job-queue 2019-08-14 21:44:50 +03:00
Egor Kislitsyn
e457fcc479 Add :max_remote_account_fields config option 2019-08-14 14:58:06 +07:00
Egor Kislitsyn
f7bbf99caa Use info.fields instead of source_data for remote users 2019-08-14 14:52:54 +07:00
Egor Kislitsyn
7d6f8a7fd7 Linkify custom fields values in ActivityPub.UserViewx 2019-08-14 14:52:54 +07:00
Egor Kislitsyn
5178f960c3 Support user attachment update in Transmogrifier 2019-08-14 14:52:54 +07:00
Egor Kislitsyn
88598c9baf Add profile custom fields to ActivityPub.UserView 2019-08-14 14:52:54 +07:00
kaniini
5c35d2f1d8 Merge branch 'preload-user-timelines' into 'develop'
Preload thread mutes/bookmarks in user_statuses

See merge request pleroma/pleroma!1563
2019-08-14 01:04:07 +00:00
kaniini
fe42844bda Merge branch 'get-context-optimizations' into 'develop'
Preload thread mutes/bookmarks in get_context

See merge request pleroma/pleroma!1562
2019-08-14 01:03:54 +00:00
rinpatch
8202f1634a Preload thread mutes/bookmarks in user_statuses 2019-08-14 03:02:09 +03:00
rinpatch
f4e087ee48 Preload thread mutes/bookmarks in get_context
Also removes filtering for creates (was done on the database side
already) and filtering for the requested activity (moved to the database
side) from application side.
2019-08-14 02:36:54 +03:00
rinpatch
9ef31767f2 Merge branch 'feature/mrf-vocabulary' into 'develop'
MRF Vocabulary

See merge request pleroma/pleroma!1559
2019-08-13 22:51:15 +00:00
Ariadne Conill
abfbcfdcb3 mrf_vocabulary: add describe API support 2019-08-13 22:39:26 +00:00
Ariadne Conill
4244e17de0 fix credo 2019-08-13 22:36:24 +00:00
Ariadne Conill
c574b7a1fc MRF: add describe() to all modules, add base MRF configuration to base describe() 2019-08-13 22:08:58 +00:00
Ariadne Conill
694bc43123 MRF: add describe() for gathering and describing the MRF configuration 2019-08-13 21:26:24 +00:00
Maksim
fea4d89e9f tests for Web/ActivityPub/Relay 2019-08-13 21:12:59 +00:00
Ariadne Conill
3fdbeb7087 MRF: add vocabulary policy module 2019-08-13 20:55:38 +00:00
Ivan Tashkinov
0e1c481a94 [#1149] Added more oban workers. Refactoring. 2019-08-13 20:20:26 +03:00
Ariadne Conill
f46cd7e9c7 config: remove legacy activitypub accept_blocks setting
Anyone who is interested in dropping blocks can write their own MRF
policy at this point.  This setting predated the MRF framework.

Disabling the side effect (unsubscription) is still a config option
per policy.
2019-08-13 02:15:21 +00:00
rinpatch
92479c6f48 Do not fetch the reply object in fix_type unless the object has the
`name` key and use a depth limit when fetching it
2019-08-11 22:49:55 +03:00
Ariadne Conill
9cfc289594 MRF: ensure that subdomain_match calls are case-insensitive 2019-08-10 21:19:26 +00:00
Sergey Suprunenko
af4cf35e20 Strip internal fields including likes from incoming and outgoing activities 2019-08-10 18:47:40 +00:00
Maxim Filippov
dfae61c25c Fix deactivated user deletion 2019-08-09 23:05:28 +03:00
Ivan Tashkinov
267262491e Merge remote-tracking branch 'remotes/upstream/develop' into 1149-oban-job-queue 2019-08-09 20:09:56 +03:00
Ivan Tashkinov
b7fad8d395 [#1149] Oban jobs implementation for :federator_incoming and :federator_outgoing queues. 2019-08-09 20:08:01 +03:00
rinpatch
4f1b9c54b9 Do not rembed the object after updating it 2019-08-07 01:02:29 +03:00
rinpatch
73d8d5c49f Stop depending on the embedded object in restrict_favorited_by 2019-08-07 00:12:42 +03:00
Sergey Suprunenko
e8ad116c2a Do not add the "next" key to likes.json if there is no more items 2019-08-04 17:13:06 +00:00
kaniini
86fffe9c27 Merge branch 'patch-2' into 'develop'
Add preferredUsername to service actors so Mastodon can resolve them

See merge request pleroma/pleroma!1526
2019-08-03 18:55:09 +00:00
Thibaut Girka
1fce56c7df Refactor 2019-08-03 18:37:20 +00:00
Thibaut Girka
16cfb89240 Only add preferredUsername to service actor json when the underlying user actually has a username 2019-08-03 18:28:08 +00:00
Sergey Suprunenko
8b2fa31fed Handle MRF rejections of incoming AP activities 2019-08-03 18:12:38 +00:00
Thibaut Girka
a187dbb326 Add preferredUsername to service actors so Mastodon can resolve them 2019-08-03 17:24:57 +00:00
Ivan Tashkinov
23d279e03e [#1149] Replaced RetryQueue with oban-based retries. 2019-08-01 17:28:00 +03:00
rinpatch
c88a5d3251 Merge branch 'develop' into feature/hide-follows-remote 2019-07-31 14:12:29 +03:00
Ariadne Conill
b93498eb52 constants: add as_public constant and use it everywhere 2019-07-29 02:43:19 +00:00
Ariadne Conill
492d854e7a transmogrifier: use User.delete() instead of handrolled user deletion code for remote users
Closes #1104
2019-07-28 21:32:04 +00:00
rinpatch
41e0304757 Merge branch 'develop' into feature/hide-follows-remote 2019-07-25 18:43:30 +03:00
Maxim Filippov
f46805bb40 Merge branch 'develop' into feature/admin-api-user-statuses 2019-07-24 02:42:28 +03:00
Maxim Filippov
03471151d6 AdminAPI: Add "godmode" while fetching user statuses (i.e. admin can see private statuses) 2019-07-24 01:51:36 +03:00
Maksim
c49a09ed88 tests for Pleroma.Web.ActivityPub.Publisher 2019-07-23 19:15:48 +00:00
Alexander Strizhakov
b70e659304 Feature/1087 wildcard option for blocks 2019-07-22 14:33:58 +00:00
Ariadne Conill
56019d53a8 activitypub: publisher: align sharedinbox usage with AP specification rules
While debugging the follow breakage, I observed that our sharedInbox usage
did not match the rules in the specification.  Accordingly, I have better
aligned our usage of sharedInbox with the rules outlined in the ActivityPub
specification.
2019-07-22 02:38:31 +00:00
rinpatch
196cad46f3 Resolve merge conflicts 2019-07-20 22:04:47 +03:00
Ariadne Conill
cf9cb953d5 activitypub: represent internal fetch actor 2019-07-17 17:34:57 +00:00
Ariadne Conill
d930e5d5c3 activitypub: introduce internal fetch service actor 2019-07-17 17:14:08 +00:00
Ariadne Conill
a9d6a12bb3 activitypub: controller: rework the way the relay actor is presented so the code can be reused 2019-07-17 16:33:08 +00:00
Ariadne Conill
4885473be2 user: refactor get_or_create_instance_user() into get_or_create_service_actor_by_id() 2019-07-17 16:03:05 +00:00
RX14
96a2890a9e
Add MRF MentionPolicy for dropping posts which mention specific actors 2019-07-17 15:16:55 +01:00
Egor Kislitsyn
70439494af Fix typo 2019-07-16 14:56:07 +07:00
Maksim
c32384c1ea tests for Pleroma.Signature 2019-07-15 13:01:22 +00:00
Egor Kislitsyn
de13c9bb8f List messages must be visible for mentioned users 2019-07-15 14:54:40 +07:00
Egor Kislitsyn
d86a97abfb Add an explanation comment to Publisher.publish/2 2019-07-15 14:20:31 +07:00
Egor Kislitsyn
64a946643e Merge remote-tracking branch 'pleroma/develop' into feature/addressable-lists 2019-07-15 14:11:54 +07:00
Ariadne Conill
739bbe0d3b security: detect object containment violations at the IR level
It is more efficient to check for object containment violations at the IR
level instead of in the protocol handlers.  OStatus containment is especially
a tricky situation, as the containment rules don't match those of IR and
ActivityPub.

Accordingly, we just always do a final containment check at the IR level
before the object is added to the IR object graph.
2019-07-14 17:47:08 +00:00
rinpatch
0c2dcb4c69 Add follow information refetching after following/unfollowing 2019-07-14 01:58:39 +03:00
rinpatch
183da33e00 Add tests for fetch_follow_information_for_user and check object type
when fetching the page
2019-07-14 00:56:02 +03:00
rinpatch
d06d1b751d Use atoms when updating user info 2019-07-14 00:21:35 +03:00
rinpatch
e5b850a991 Refactor fetching follow information to a separate function 2019-07-13 23:56:10 +03:00
rinpatch
e8fa477793 Refactor Follows/Followers counter syncronization
- Actually sync counters in the database instead of info cache (which got
overriden after user update was finished anyway)
- Add following count field to user info
- Set hide_followers/hide_follows for remote users based on http status
codes for the first collection page
2019-07-13 19:27:49 +03:00