Commit graph

837 commits

Author SHA1 Message Date
Egor Kislitsyn
cfa6e7289f Improve Transmogrifier.upgrade_user_from_ap_id/2 2019-04-04 16:10:43 +07:00
Haelwenn
0cb94cfa94 Merge branch 'fix-slow-relationships' into 'develop'
ActivityPub Utils: Greatly speed up the follow / block activity fetching.

See merge request pleroma/pleroma!1011
2019-04-02 18:43:48 +00:00
lambda
a79ce94dd4 Merge branch 'feature/fake-statuses' into 'develop'
Add fake status submit

See merge request pleroma/pleroma!995
2019-04-02 14:17:43 +00:00
lain
39bcf93007 Merge remote-tracking branch 'origin/develop' into fix-slow-relationships 2019-04-02 16:10:38 +02:00
lain
fd07745d1b ActivityPub Utils: Greatly speed up the follow / block activity fetching. 2019-04-02 16:08:55 +02:00
Egor Kislitsyn
4212527928 change Repo.get(Activity, id) => Activity.get_by_id(id) 2019-04-02 16:50:31 +07:00
rinpatch
fe5145eeaa Move putting fake attribute to lib/pleroma/web/activity_pub/utils.ex 2019-04-01 12:25:53 +03:00
rinpatch
975482f091 insert object defaults for fake activities and make credo happy 2019-04-01 12:16:51 +03:00
rinpatch
d866b59eea oof 2019-04-01 11:58:08 +03:00
rinpatch
45ba10bf47 Fix the issue with HTML scrubber 2019-04-01 11:55:59 +03:00
rinpatch
cd387f8693 Add a fake option to lazy_put_actvity_defaults 2019-03-30 13:57:54 +03:00
rinpatch
1bb4d5d65b Implement fake status submit 2019-03-29 21:59:04 +03:00
Haelwenn (lanodan) Monnier
6f15224053
activity_pub.ex: Move limit/max_id restrictions to Pagination helpers 2019-03-28 17:18:59 +01:00
rinpatch
ce6d64bbd8 Fix missing announces in MastoAPI home timeline
Closes #762
2019-03-27 12:28:53 +03:00
lambda
ff3b09f6b3 Merge branch 'fix/ap-icon' into 'develop'
Do not federate instance avatar

Closes #759

See merge request pleroma/pleroma!977
2019-03-26 16:12:50 +00:00
lain
10a7a4a868 AP UserView: Refactor banner / avatar display code, add test. 2019-03-26 16:59:28 +01:00
eugenijm
568e348588 Increment replies_count on replies (MastoAPI) 2019-03-26 15:27:04 +03:00
Mark Felder
c410296120 Try sending an empty map 2019-03-25 19:00:35 -05:00
Mark Felder
6f090f981b Attempt to fix incorrect federation of default instance avatars 2019-03-25 18:47:04 -05:00
rinpatch
750de7d842 Merge branch 'features/mrf-keyword-nil-summary' into 'develop'
mrf/keyword_policy.ex: Fix when summary == nil, do not whitelist content == nil

See merge request pleroma/pleroma!968
2019-03-24 15:02:13 +00:00
Haelwenn (lanodan) Monnier
eab9425cc4
mrf/keyword_policy.ex: Fix when summary == nil, do not whitelist content == nil 2019-03-24 15:47:50 +01:00
William Pitcock
8c70156157 activitypub: object view: use preloaded object when possible 2019-03-23 03:05:14 +00:00
William Pitcock
ce47eb8b29 activitypub: when fetching objects, use the preloaded object from the synthesized activity 2019-03-23 03:05:10 +00:00
William Pitcock
4cedf45423 relay: use preloaded object since we always have it 2019-03-23 02:28:56 +00:00
William Pitcock
73efe95368 activitypub: allow skipping preload in some cases (like certain tests where the preload is obnoxious) 2019-03-23 01:09:12 +00:00
William Pitcock
ba7299fc87 activitypub: add missing with_preloaded_object() 2019-03-23 00:53:35 +00:00
William Pitcock
e4307cadc8 activitypub: splice in the child object if we have one 2019-03-23 00:40:08 +00:00
William Pitcock
9aea7cc224 activitypub: preload child objects when fetching timelines 2019-03-23 00:10:17 +00:00
William Pitcock
1685e4258f transmogrifier: upgrade: when upgrading OStatus users to AP, ensure we always use the fake collection 2019-03-19 18:39:33 +00:00
William Pitcock
cd055983c3 transmogrifier: when determining followers collection URI, we may need to fetch the actor 2019-03-19 18:04:57 +00:00
William Pitcock
d487b753c3 activitypub: transmogrifier: do not allow missing lists to be interpreted as nil 2019-03-19 17:30:25 +00:00
William Pitcock
798da28812 activitypub: transmogrifier: ensure as:Public activities are delivered to followers 2019-03-19 17:27:42 +00:00
Zachary Dunn
5ba14c664b Fix missing end brace 2019-03-18 14:05:10 +00:00
Zachary Dunn
a2e03d4f3c Initial attempt at updating return type 2019-03-18 13:56:59 +00:00
kaniini
6d6f48d079 Merge branch 'feature/federated-flags' into 'develop'
Federated reports

See merge request pleroma/pleroma!935
2019-03-16 19:27:56 +00:00
d8244c2a1b remove unused function 2019-03-15 15:03:03 +01:00
15b21d1983 refactor filtering mechanism 2019-03-15 14:18:53 +01:00
c8f31e0bc2 Implement mastodon's reblog hiding feature 2019-03-15 14:18:21 +01:00
William Pitcock
423fd07928 activitypub: inject to/cc fields on non-forwarded reports since Flag activities are now Forwardable 2019-03-14 19:52:08 +00:00
William Pitcock
5c7b774f09 reports: unify sending e-mail for both remote and local reports 2019-03-14 19:44:08 +00:00
William Pitcock
64b0120d67 activitypub: add support for forwarding reports 2019-03-14 19:36:17 +00:00
William Pitcock
379442ad17 activitypub: utils: also match Activity objects 2019-03-14 19:29:04 +00:00
William Pitcock
0f3ecb2bfb activitypub: transmogrifier: accept remote Flag activities 2019-03-14 19:06:02 +00:00
William Pitcock
f86f7dbb8f activitypub: utils: rework make_flag_data to accept either activity payloads or IRIs 2019-03-14 19:05:42 +00:00
rinpatch
34fc0dca2e Merge branch 'hotfix/delete-activities' into 'develop'
Fix delete activities not federating

See merge request pleroma/pleroma!933
2019-03-14 17:49:00 +00:00
rinpatch
e630e5e135 Fix delete activities not federating 2019-03-14 20:43:14 +03:00
Haelwenn (lanodan) Monnier
23960309a0
[Credo] Change quoted string with 3+ quotes to sigils 2019-03-13 04:26:56 +01:00
Haelwenn (lanodan) Monnier
c42d34b2ec
[Credo] fix Credo.Check.Readability.MaxLineLength 2019-03-13 04:26:56 +01:00
Haelwenn (lanodan) Monnier
c3d41b2b6e
[Credo] make all variables use snake_case 2019-03-13 04:26:56 +01:00
Haelwenn (lanodan) Monnier
fb82f6fc7c
[Credo] Remove parentesis on argument-less functions 2019-03-13 04:26:56 +01:00
Haelwenn (lanodan) Monnier
a3a9cec483
[Credo] fix Credo.Check.Readability.AliasOrder 2019-03-13 04:26:54 +01:00
eugenijm
6038c8a753 Broadcast deleted activity id on deletion to conform to MastoAPI streamig spec 2019-03-11 09:02:03 +03:00
kaniini
130fc9eae6 Merge branch 'fetch-posts-on-first-federation' into 'develop'
Fetch user's outbox posts on first federation with that user

Closes #131

See merge request pleroma/pleroma!907
2019-03-08 22:33:31 +00:00
Ekaterina Vaartis
5021b7836f Fetch user's outbox posts on first federation with that user 2019-03-08 16:27:56 +03:00
William Pitcock
e53a9fd15e MRF: anti followbot: gracefully handle accounts without a display name 2019-03-07 12:13:48 +00:00
rinpatch
992145e64c Merge branch 'bugfix/delete-activity-audience' into 'develop'
expand the audience of delete activities to all recipients of the deleted object

Closes #682

See merge request pleroma/pleroma!891
2019-03-07 11:31:08 +00:00
c2faae70df Adjust delete activity audience to match the deleted object 2019-03-07 12:26:03 +01:00
6a69ece437 Revert existing object check 2019-03-07 11:53:15 +01:00
28d5b40d0a Add handling of objects not in database 2019-03-05 23:15:22 +01:00
rinpatch
33c614bce0 Stop adresssing like activities to actor's follower collection on non-public posts 2019-03-04 18:09:58 +03:00
Egor Kislitsyn
eb84de0143 allow users to disable their own account 2019-03-04 19:55:11 +07:00
1445dc25d4 fix format 2019-03-04 11:18:45 +01:00
aab86698a5 Expand "to" of delete activities 2019-03-04 11:18:45 +01:00
kaniini
c93479c6f5 Merge branch 'count-only-public-statuses' into 'develop'
Increment user note count only on public activities #703

See merge request pleroma/pleroma!884
2019-03-03 15:49:19 +00:00
eugenijm
d5418e9ff7 Remove follow_request_count as it's not needed for FE anymore.
MastoFE uses `GET /api/v1/follow_requests` and PleromaFE uses
`GET /api/pleroma/friend_requests` which they query on the initial page
load.
2019-03-03 18:42:27 +03:00
lambda
9b63fda9c7 Merge branch 'fix/dont-show-dms-in-mentions-timeline' into 'develop'
[#675] Do not show DMs in mentions timeline

See merge request pleroma/pleroma!877
2019-03-03 11:13:59 +00:00
eugenijm
c46950d3b1 Increment user note count only on public activities 2019-03-03 14:08:43 +03:00
William Pitcock
689b0730f8 activitypub: fix date header format
HTTP date header specification says that days must always be two-digit.
Accordingly, change the format string used to ensure days are always
represented as two-digit (e.g. 01).
2019-03-01 12:22:45 +00:00
rinpatch
1341ee650e [#675] Do not show DMs in mentions timeline 2019-03-01 09:37:29 +03:00
lain
c4235f96bd Add with_muted param. 2019-02-27 16:37:42 +01:00
lain
9e0686efa6 Move visibility into own module. 2019-02-22 13:29:52 +01:00
lain
62296f5a25 Fix private post card handling. 2019-02-22 12:02:51 +01:00
KZ
7c722c08f5 Fix: Fixing an outbox related bug when local user activity is empty 2019-02-22 04:37:48 +00:00
William Pitcock
f8a72f2997 activitypub: sign http date header 2019-02-21 00:23:17 +00:00
Egor
bff9eb5ef7 Reports 2019-02-20 16:51:25 +00:00
Ekaterina Vaartis
5a46d37af9 Update the mute implementation to the current codebase
Make it part of the info thing (and do a migration to ensure it's there)
2019-02-19 23:09:16 +03:00
Ekaterina Vaartis
f41f017bbc Implement muting, add it to the mastodon API 2019-02-19 21:49:55 +03:00
lambda
f25a3f4f78 Merge branch 'fix/check-follower-collection-in-is_private' into 'develop'
properly check for follower address in is_private?

See merge request pleroma/pleroma!841
2019-02-19 14:08:19 +00:00
rinpatch
96dcacade1 properly check for follower address in is_private? 2019-02-19 13:23:13 +03:00
kaniini
833161b5d2 Merge branch 'feature/jobs' into 'develop'
Job Queue

See merge request pleroma/pleroma!732
2019-02-18 19:43:06 +00:00
kaniini
cd019a5927 Merge branch 'follow-request-count' into 'develop'
Follow request count

See merge request pleroma/pleroma!817
2019-02-18 04:01:26 +00:00
rinpatch
8f98d970c1 Fix recipient count in hellthread policy 2019-02-17 13:46:40 +03:00
rinpatch
921571c19b Merge branch 'hellthread-filter-fix' into 'develop'
Hellthread filter fix

Closes #634

See merge request pleroma/pleroma!831
2019-02-15 13:18:35 +00:00
c2e0a0c8d4 Readd threshold is not 0 check, optmization? 2019-02-15 14:05:20 +01:00
dca6bee2f7 Rename test, add check for follower collection when delisting 2019-02-15 13:43:14 +01:00
rinpatch
b63a5e309d Merge branch 'bugfix/actor-containment' into 'develop'
activitypub: correctly handle bare URIs in user lookup

Closes #645

See merge request pleroma/pleroma!829
2019-02-15 12:27:03 +00:00
d943c90249 Add tests, change default config values, fix a bug 2019-02-15 12:47:50 +01:00
eugenijm
ecdf0657ba Add logic for keeping follow_request_count up-to-date on the follow,
`approve_friend_request`, and `deny_friend_request` actions.
Add follow_request_count to the user view.
2019-02-15 12:20:20 +03:00
lambda
ea2698beb7 Merge branch 'bugfix/activitypub-reserialization' into 'develop'
activitypub transmogrifier: fix reserialization edge cases

See merge request pleroma/pleroma!826
2019-02-14 19:54:16 +00:00
William Pitcock
56862f4ce1 activitypub: clean up logging statements a little 2019-02-14 19:42:33 +00:00
William Pitcock
72ba5b4ab7 activitypub: user view: formatting 2019-02-14 03:13:07 +00:00
William Pitcock
5307c211b8 activitypub: user view: report totalItems=0 for follows/followers when hidden 2019-02-14 03:10:00 +00:00
William Pitcock
6542b86292 activitypub: user view: remove totalItems from user outbox
(this is based on a counter in User.Info, but the counter is not reliable.)
2019-02-14 03:02:45 +00:00
William Pitcock
ee2fa1a314 activitypub: user view: remove totalInbox from user inbox view
It is not really feasible to quickly calculate the totalItems value and
it shouldn't be trusted anyway.
2019-02-14 03:01:39 +00:00
William Pitcock
64620d8980 activitypub: user view: do not expose oAuth endpoints for instance users 2019-02-14 02:41:21 +00:00
William Pitcock
e05bf2940f activitypub: transmogrifier: correctly handle nil inReplyTo value 2019-02-14 00:35:54 +00:00
William Pitcock
94cbbb0e3a activitypub: transmogrifier: do not attempt to expand pre-existing AS2 tag objects 2019-02-14 00:35:53 +00:00
William Pitcock
9bd6ed975e activitypub: user view: use route helpers instead of hardcoded URIs 2019-02-13 19:34:43 +00:00
William Pitcock
29e946ace4 activitypub: user view: add oauthRegistrationEndpoint to user profiles 2019-02-13 19:34:43 +00:00
William Pitcock
db8abd958d activitypub: user view: fix up endpoints rendering 2019-02-13 19:34:43 +00:00
William Pitcock
90facd3598 user view: add AP C2S oauth endpoints to local user profiles 2019-02-13 19:34:43 +00:00
bef9b9cb66 refactored code 2019-02-13 16:23:09 +01:00
adcdd21f16 Merge branch 'develop' into hellthread-filter-fix 2019-02-13 16:22:14 +01:00
1d727cd069 added checks for public url and follower collections 2019-02-13 00:01:34 +01:00
rinpatch
379d04692c Filter summary in keywordpolicy 2019-02-11 21:35:40 +03:00
lambda
d53e36bf1e Revert "Merge branch 'object-creation' into 'develop'"
This reverts merge request !802
2019-02-11 08:07:39 +00:00
Egor Kislitsyn
305d219413 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/jobs
# Conflicts:
#	lib/pleroma/web/federator/federator.ex
#	lib/pleroma/web/websub/websub.ex
2019-02-11 13:54:21 +07:00
kaniini
6c8d15da11 Merge branch 'fix/credo-issues' into 'develop'
Fix credo issues

See merge request pleroma/pleroma!786
2019-02-10 20:54:21 +00:00
lain
f8388be9c6 Do object insertion through Cachex
So we don't flood our postgres logs with errors. Should also make things
slightly faster.
2019-02-09 22:01:08 +01:00
Haelwenn (lanodan) Monnier
6a6a5b3251
de-group alias/es 2019-02-09 16:31:17 +01:00
Haelwenn (lanodan) Monnier
d2e4eb7c74
Web.ActivityPub.ActivityPub: assign the Enum.filter to recipients & simplify it 2019-02-09 14:59:21 +01:00
Haelwenn (lanodan) Monnier
60ea29dfe6
Credo fixes: alias grouping/ordering 2019-02-09 14:59:20 +01:00
Haelwenn (lanodan) Monnier
8bcfac93a8
Make credo happy 2019-02-09 14:59:20 +01:00
rinpatch
7356659273 wow 2019-02-08 15:12:13 +03:00
rinpatch
f88dec8b33 What idiot did that? (me) 2019-02-08 13:16:50 +03:00
rinpatch
6c21f5aa16 Merge branch 'develop' into feature/keyword-policy 2019-02-08 13:12:33 +03:00
rinpatch
8a0b755c19 rename ftl_removal to federated_timeline_removal to keep consistent naming with SimplePolicy 2019-02-08 13:12:09 +03:00
rinpatch
46aa8c18a2 Add keyword policy 2019-02-08 12:38:24 +03:00
Mark Felder
74518d0b60 hide_followings was renamed to hide_followers in the FE, but never synced up in the BE
This was a dirty regex replace which worked on my server
2019-02-06 22:34:44 +00:00
rinpatch
f7aedbcc55 Merge branch 'fix/activitypub-user-view-badmap' into 'develop'
Fix if clause in activity_pub user_view

See merge request pleroma/pleroma!783
2019-02-06 17:47:58 +00:00
href
f753043ce0
Fix if clause in activity_pub user_view 2019-02-06 18:42:19 +01:00
Egor Kislitsyn
6f05f448f8 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/jobs 2019-02-06 11:33:00 +07:00
kaniini
d120aa63f0 Merge branch 'fix-dm-index' into 'develop'
Massage index until it actually does the stuff we want.

See merge request pleroma/pleroma!772
2019-02-05 20:27:31 +00:00
kaniini
681ba1e52f Merge branch 'feature/ap-c2s-whoami' into 'develop'
activitypub: c2s: add /api/ap/whoami endpoint for andstatus

See merge request pleroma/pleroma!773
2019-02-05 20:26:31 +00:00
kaniini
eb2b1960e0 Merge branch 'feature/split-hide-network-v2' into 'develop'
Split hide_network into hide_followers & hide_followings (fixed)

See merge request pleroma/pleroma!765
2019-02-05 18:56:59 +00:00
William Pitcock
e71ab5a10f activitypub: transmogrifier: fix bare tags 2019-02-05 00:43:28 +00:00
William Pitcock
db1165f70f activitypub: c2s: add /api/ap/whoami endpoint for andstatus 2019-02-04 22:58:29 +00:00
lain
f3c8b02d65 Massage index until it actually does the stuff we want.
Also makes the index a lot smoler.
2019-02-04 23:47:29 +01:00
William Pitcock
7d110be119 activitypub: mrf: tag policy: fix force-unlisted and sandbox actions 2019-02-04 19:03:54 +00:00
William Pitcock
64a3993425 activitypub: mrf: tag policy: add support for subscription control 2019-02-04 17:48:48 +00:00
William Pitcock
ff2c28fd6d activitypub: mrf: tag policy: refactor the filtering hook a bit 2019-02-04 17:06:37 +00:00
William Pitcock
9a69f08e86 activitypub: mrf: tag policy: add support for processing follow requests 2019-02-04 17:04:05 +00:00
William Pitcock
084bb8ccd5 activitypub: mrf: tag policy: implement force-unlisted and sandbox 2019-02-04 17:04:05 +00:00
William Pitcock
88e32a32ce mrf: add initial MRF.TagPolicy engine 2019-02-04 17:04:05 +00:00
Egor Kislitsyn
3a3a3996b7 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/jobs
# Conflicts:
#	lib/pleroma/web/activity_pub/activity_pub.ex
#	lib/pleroma/web/federator/federator.ex
2019-02-04 20:50:28 +07:00
rinpatch
89762ad230 Merge branch 'feature/hellthread-filter-improvements' into 'develop'
Improve hellthread filter

Closes #584

See merge request pleroma/pleroma!766
2019-02-04 12:36:50 +00:00
58262a8b8a removed a debug thingy 2019-02-04 11:22:25 +00:00
4430641349 squished a bug 2019-02-04 12:09:00 +01:00
3cf046babb actually commited the changes 2019-02-04 10:23:43 +01:00
63a4f4b7be fixed Map,put arguments, updated nomenclature 2019-02-04 10:23:07 +01:00
583c4e0f17 more tweaks, fixed silly mistakes... 2019-02-03 23:56:20 +01:00
e10cda7541 implemented tweaks 2019-02-03 22:46:06 +01:00
531507a635 fixed things 2019-02-03 20:45:32 +01:00
10130fa7d6 made toggleable, added docs 2019-02-03 20:27:28 +01:00
0ef0ae35ab added optional delist feature 2019-02-03 20:12:23 +01:00
Maxim Filippov
16ce129e38 Split hide_network into hide_followers & hide_followings (fixed) 2019-02-03 21:55:04 +03:00
lambda
69a38644bc Merge branch '589-fix-cache' into 'develop'
Resolve "Update object cache on favs/boosts"

Closes #589

See merge request pleroma/pleroma!764
2019-02-03 18:19:40 +00:00
lain
505a084058 Still do caching in tests. 2019-02-03 18:28:14 +01:00
Ivan Tashkinov
3913b0196e [#582] Made single-pub task call Instance.set_reachable/1 if set_reachable is not specified.
Added tests.
2019-02-03 13:28:13 +03:00
Ivan Tashkinov
b40b4bc4e5 [#582] Optimized federation retirement by reducing the number of SQL calls
(calling `Instances.set_reachable/1` only if instance had `unreachable_since`,
calling `Instances.set_unreachable/1` only if instance had nil `unreachable_since`).
2019-02-03 12:41:27 +03:00