Commit graph

445 commits

Author SHA1 Message Date
squidboi
4e099fcfa9
move configurable module attributes into relevant functions 2018-06-23 14:16:08 -07:00
Haelwenn (lanodan) Monnier
c45133377a
lib/pleroma/web/activity_pub/mrf/simple_policy.ex: mix format
Hnng!
2018-06-23 16:12:57 +02:00
William Pitcock
60d6038be5 mrf simple: add accept lists
accept lists supplement reject lists by requiring that any message accepted by contained
by the accept list.

in other words, this functionality can be used to implement instances similar to
awoo.space.
2018-06-19 21:28:24 +00:00
lambda
90cf75f4a7 Merge branch 'features/column_media_streaming' into 'develop'
Add streaming to media tabs of federated and local TLs

See merge request pleroma/pleroma!225
2018-06-19 09:50:05 +00:00
lambda
db0731b6ac Merge branch 'feature/exclude-replies-filter' into 'develop'
activitypub: support filtering activities by whether or not they are a reply (closes #109)

Closes #109

See merge request pleroma/pleroma!226
2018-06-19 05:15:11 +00:00
William Pitcock
c95941e64d activitypub transmogrifier: fix handling of contentMap. 2018-06-18 22:14:50 +00:00
William Pitcock
591c82620e activitypub: filter destination list for announce activities differently than normal (closes #164) 2018-06-18 04:36:25 +00:00
William Pitcock
4f589998ee activitypub: support filtering activities by whether or not they are a reply (closes #109) 2018-06-18 03:21:32 +00:00
Haelwenn (lanodan) Monnier
b670d4d683
MastodonAPI: Add streaming to media tabs of federated and local TLs 2018-06-17 16:17:15 +02:00
squidboi
2e294ee44a Merge branch 'develop' into feature/configurable-blocks 2018-06-16 15:37:16 -07:00
lambda
1ea4a18ad8 Merge branch 'feature/configure-mrf-rejectnonpublic' into 'develop'
Configs for mrf_rejectnonpublic

See merge request pleroma/pleroma!205
2018-06-16 10:39:36 +00:00
lambda
2723fb5150 Merge branch 'bugfix/mrf-orphaning' into 'develop'
activitypub transmogrifier: handle activity lookup failure

Closes #156

See merge request pleroma/pleroma!216
2018-06-14 07:20:54 +00:00
lambda
8c7fdcb31b Merge branch 'feature/twitterapi-unrepeat' into 'develop'
Add TwitterAPI unretweet endpoint and cleanup AP.unannounce

See merge request pleroma/pleroma!218
2018-06-14 07:19:36 +00:00
Francis Dinh
1555c66650 Add unretweet TwAPI endpoint and cleanup AP.unannounce 2018-06-13 21:33:36 -04:00
William Pitcock
401e8af943 activitypub transmogrifier: handle activity lookup failure
with the introduction of MRF, it is possible that an activity may be orphaned from it's parent, if
an activity in the chain was rejected by the active MRF policies.  accordingly, handle this in the
same way as any other orphaned activity.

closes #156
2018-06-13 22:19:38 +00:00
lambda
3f42806b1b Merge branch 'develop' into 'develop'
Dedupe uploads

See merge request pleroma/pleroma!115
2018-06-12 08:26:26 +00:00
lambda
564c73ab24 Merge branch 'feature/list-streaming' into 'develop'
MastoAPI: Add streaming for lists.

See merge request pleroma/pleroma!183
2018-06-12 07:19:45 +00:00
William Pitcock
d96377f359 activitypub transmogrifier: accept/reject outgoing: we might send the actual object instead of the URI in some cases, handle it 2018-06-11 22:15:53 +00:00
William Pitcock
5eed1ea181 run mix format 2018-06-11 22:15:53 +00:00
William Pitcock
4084889a2d activitypub transmogrifier: remove debug code 2018-06-11 22:15:53 +00:00
William Pitcock
76f80ba8c2 activitypub: when unfollowing, update the follow activity's disposition to 'cancelled' so it cannot be reused 2018-06-11 22:15:53 +00:00
William Pitcock
f328de8eb7 activitypub transmogrifier: send Rejects in the format Mastodon wants 2018-06-11 22:15:53 +00:00
William Pitcock
876ad6aa38 activitypub transmogrifier: send @context on accept activities 2018-06-11 22:15:53 +00:00
William Pitcock
760eb72a38 add a bunch of stuff 2018-06-11 22:15:53 +00:00
William Pitcock
9c88933422 implement tracking of follow requests 2018-06-11 22:15:53 +00:00
William Pitcock
6041380774 activitypub transmogrifier: learn locked state in Update messages 2018-06-11 22:15:27 +00:00
William Pitcock
e5206752e1 activitypub: only send accept back automatically if the account is not locked 2018-06-11 22:15:27 +00:00
lambda
7f79b467b1 Merge branch 'feature/domain-blocks' into 'develop'
Domain blocks

See merge request pleroma/pleroma!190
2018-06-11 11:19:45 +00:00
squidboi
07f0cfa53f
add allow_followersonly and allow_direct options for configuring mrf_rejectnonpublic 2018-06-10 16:40:51 -07:00
squidboi
4f9ecfc77a formatting 2018-06-09 04:28:11 +00:00
squidboi
8903f1ad4d more fixes 2018-06-08 19:07:14 -07:00
squidboi
16d896f526 fixes 2018-06-08 19:01:14 -07:00
squidboi
2847fc8f90 add option to not unfollow on block, and option to not federate outgoing blocks 2018-06-08 17:12:16 -07:00
lambda
45a935f0bd Merge branch 'users' into 'develop'
Fix users lookup/return type

See merge request pleroma/pleroma!201
2018-06-08 11:10:10 +00:00
lambda
bb639a362e Merge branch 'feature/rejectnonpublic' into 'develop'
Add MRF to drop all posts with "followers-only" or "direct" privacy settings

See merge request pleroma/pleroma!202
2018-06-08 11:08:50 +00:00
Rachel H
fa0c2727d8 Fix users lookup/return type
* Allow viewing user in frontend by id on pageload
2018-06-07 23:18:45 -07:00
squidboi
e2c4013c88
s/get_by_ap_id/get_cached_by_ap_id/ 2018-06-07 22:33:50 -07:00
squidboi
6e7f91bf8f
final format 2018-06-07 22:14:39 -07:00
squidboi
82225dfc8d
even more formatting 2018-06-07 22:10:11 -07:00
lambda
c86823f724 Merge branch 'bugfix/locked-account-regression' into 'develop'
security fix: locked account regression

See merge request pleroma/pleroma!200
2018-06-08 05:10:08 +00:00
squidboi
990cde7439
more formatting 2018-06-07 22:03:24 -07:00
squidboi
5b9e1f228a
formatting 2018-06-07 21:55:58 -07:00
squidboi
f69d38e455
add mrf for dropping follower-only and direct posts 2018-06-07 21:00:57 -07:00
William Pitcock
47c7e259c4 activitypub transmogrifier: fix locked account state from being clobbered 2018-06-08 02:52:29 +00:00
William Pitcock
a003bdc30a activitypub transmogrifier: learn locked state in Update messages 2018-06-08 02:52:24 +00:00
William Pitcock
09604182d0 add the ability to 'quarantine' an activitypub peer, causing them to be treated as an OStatus peer. 2018-06-07 14:38:09 +00:00
Sir_Boops
3f0440ac3c
Dedupe uploads 2018-06-06 13:25:44 -06:00
eal
29c9c8d93b Extract host from ap_id, add index 2018-06-06 21:13:40 +03:00
eal
9075b6d25b ActivityPub.ex: filter domain blocked activities. 2018-06-03 23:33:33 +03:00
lain
06439f64d0 Better error handling for ActivityPubController 2018-06-03 19:58:59 +02:00
lain
5e76adb07e Fix url guessing attacks. 2018-05-30 20:00:45 +02:00
eal
5d3fdbc082 MastoAPI: Add streaming for lists. 2018-05-30 16:48:59 +03:00
lain
841ee8e3e4 Simplify DM query.
Should also use indexes better.
2018-05-26 16:25:32 +02:00
lain
4b3ec53514 Merge branch 'develop' into csaurus/pleroma-feature/mstdn-direct-api 2018-05-26 16:00:59 +02:00
lain
745072b2cc Merge branch 'kaniini/pleroma-feature/activitypub-accept-reject-conformance' into develop 2018-05-26 15:15:52 +02:00
lain
0a6c897c94 Formatting. 2018-05-26 15:11:50 +02:00
lain
bfce29866f Make Mastodon follow hack more explicit. 2018-05-26 15:07:21 +02:00
lain
3839a11ef5 Don't treat remote accepts/rejects as local.
Also, use specialized functions to get safe data.
2018-05-26 14:07:46 +02:00
lain
dd9bb37893 Rename id helper method. 2018-05-26 13:57:11 +02:00
William Pitcock
7e873756e7 activitypub transmogrifier: use fetch_latest_follow to verify a follow object exists 2018-05-26 11:20:52 +00:00
William Pitcock
1c926c7b60 activitypub: allow mastodon S2S block extension support to be disabled 2018-05-26 08:30:41 +00:00
Hakaba Hitoyo
e90b734f1c debug 2018-05-26 14:10:12 +09:00
Hakaba Hitoyo
9c7da2ef48 output repeats at ActivityPub outbox 2018-05-26 14:02:57 +09:00
William Pitcock
7cf3cf77cf activitypub transmogrifier: cleanups and tests for incoming accepts/rejects 2018-05-25 12:53:12 +00:00
William Pitcock
f35e6bf75b activitypub transmogrifier: clean up accept/reject handling a bit 2018-05-25 09:40:11 +00:00
William Pitcock
62c95e8d4d run mix format 2018-05-25 09:39:46 +00:00
William Pitcock
502ba33d01 activitypub: fix up accept/reject semantics for following
fixes #175
2018-05-25 06:14:18 +00:00
William Pitcock
c0ca9f82b9 mastodon api: properly track if an account is locked or not 2018-05-25 06:14:09 +00:00
William Pitcock
47dc52a758 activitypub utils: optimize block and follow activity lookup
multi-field @> comparison is very expensive, so only use @> for the field where it matters
this makes the query take only a few usec to execute verses many msec on a busy instance
2018-05-25 05:23:49 +00:00
lambda
c2dcd767cf Merge branch 'feature/incoming-remote-unfollow' into 'develop'
Add support for incoming remote unfollows and blocks/unblocks

See merge request pleroma/pleroma!158
2018-05-24 19:52:24 +00:00
Francis Dinh
1197ec10a8 Rewrite block fetch query 2018-05-24 13:26:59 -04:00
lain
1cd6194dee More efficient queries. 2018-05-24 12:44:26 +02:00
lambda
06c97f211f Merge branch 'feature/deps-migration' into 'develop'
Migrate to comeonin 4 and Cachex 3

See merge request pleroma/pleroma!162
2018-05-23 09:03:11 +00:00
csaurus
4fd9df100f Merge branch 'develop' into feature/mstdn-direct-api 2018-05-21 20:19:37 -04:00
William Pitcock
9a2d097ed8 activitypub controller: note that the HTTP Host header must be forwarded for http signature validation to work 2018-05-21 19:22:30 +00:00
Francis Dinh
46427cb90f Pass correct number of arguments to unfollow 2018-05-21 11:57:15 -04:00
Francis Dinh
cc5373b846 Fix unblock handling 2018-05-21 05:00:58 -04:00
Francis Dinh
2573332214 Add undo block handler 2018-05-21 04:35:43 -04:00
Francis Dinh
c8a16f334d Format 2018-05-20 21:02:06 -04:00
Francis Dinh
89c5de9096 Fix unfollows 2018-05-20 21:01:14 -04:00
Francis Dinh
1afd6d37bd Merge remote-tracking branch 'upstream/develop' into feature/incoming-remote-unfollow
Fixed some conflicts in transmogrifier.ex
2018-05-20 19:17:15 -04:00
Thog
e55c6f311b
Migrate to comeonin 4 and Cachex 3
Also fix some warning in the code and add a missing alias
2018-05-20 20:08:40 +02:00
lain
434601a5c3 Return private / direct posts on user timelines, too. 2018-05-20 16:15:18 +02:00
Francis Dinh
a9141d88aa Pass user instead of their ap_id to User.block 2018-05-19 22:02:13 -04:00
Francis Dinh
3b706ea493 Remove handler for incoming undos with object references 2018-05-19 21:34:30 -04:00
Francis Dinh
1e43de0f86 Formatting and add tests for blocks/unblocks 2018-05-19 21:23:52 -04:00
Francis Dinh
da9744eb84 Use correct variable names in unfollow 2018-05-19 20:57:37 -04:00
Thog
6f39ecc41b
Support Undo like activities (Fix #139) 2018-05-19 22:14:15 +02:00
lambda
ad563669c8 Merge branch 'feature/remote-user-deactivation' into 'develop'
remote user deactivation

See merge request pleroma/pleroma!154
2018-05-19 09:30:09 +00:00
William Pitcock
2051530868 activitypub transmogrifier: handle hubzilla AP actor quirks 2018-05-19 03:28:29 -05:00
William Pitcock
4d2c6707c2 activitypub: normalize the actor to ensure we have its URI 2018-05-19 03:28:28 -05:00
William Pitcock
13d4b6d2b5 remote user deactivation: fix test failures 2018-05-19 01:26:13 -05:00
Francis Dinh
0ec1abb3b6 Add federated blocks 2018-05-18 18:09:56 -04:00
Francis Dinh
8d11bae0d5 Revert "Undo formatting in user.ex"
This reverts commit e6dc15b96c.
2018-05-17 23:55:00 -04:00
Francis Dinh
e6dc15b96c Undo formatting in user.ex 2018-05-17 23:53:34 -04:00
Francis Dinh
d8c842a771 Add support for incoming remote unfollows 2018-05-17 22:15:57 -04:00
csaurus
4dfb40a546 Handle cases where a to/cc field is absent on a status 2018-05-14 21:54:25 -04:00
William Pitcock
9390492138 ActivityPub create: discard activities from deactivated users 2018-05-13 19:05:02 -05:00
csaurus
2ce48c1a42 Formatting 2018-05-13 15:36:41 -04:00
csaurus
9aabff4883 Fix tests. 2018-05-13 15:33:59 -04:00
lain
c7a85de35c Revert "Remove 'unlisted' handling for now."
This reverts commit 1027d1f696.
2018-05-13 12:38:13 +02:00
lain
1027d1f696 Remove 'unlisted' handling for now.
It's just too slow (over 1 second on small systems, haven't looked at
the queries in detail yet). We'll need some other way to handle it.
2018-05-13 12:07:11 +02:00
lain
a5c9dd0a2a Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into develop 2018-05-13 11:59:35 +02:00
lain
3c3933e40b Unlisted fetching: Reverse logic
Generates a faster query.
2018-05-13 11:58:03 +02:00
lambda
aeff2d6474 Merge branch 'feature/unrepeats' into 'develop'
Add unrepeats

Closes #69

See merge request pleroma/pleroma!113
2018-05-13 09:32:29 +00:00
lain
ec531ca281 Add test. 2018-05-13 11:18:48 +02:00
lain
29376fcc13 Format. 2018-05-13 10:56:44 +02:00
lain
76722ea9c8 Merge branch 'develop' into kaniini/pleroma-bugfix/unlisted-statuses 2018-05-13 10:56:11 +02:00
Francis Dinh
54ccbd8479 Use original status id instead of announce id 2018-05-13 03:42:31 -04:00
csaurus
c8d418acdd api/v1/timelines/direct implementation 2018-05-12 21:50:59 -04:00
csaurus
392bd9ef56 Stream function to handle direct messages. 2018-05-12 17:40:59 -04:00
csaurus
c60a5405db Detect and try to stream incoming "direct" messages 2018-05-12 17:40:59 -04:00
Francis Dinh
4d88747561 Revert "Log error when handling unrepeats"
This reverts commit c17c55e989.
2018-05-11 15:34:46 -04:00
Francis Dinh
c17c55e989 Log error when handling unrepeats 2018-05-11 15:29:19 -04:00
href
c220a6db43
format & made get_policies/1 private 2018-05-10 18:51:58 +02:00
href
e9e6f37bda
Chain policies
- The `:pleroma, :instance, :rewrite_policy` can now be either a policy
or a list of policies
- Made a behaviour for MRF policies
2018-05-10 18:41:06 +02:00
Francis Dinh
900c735467 Match proper number of values from unannounce 2018-05-09 00:04:14 -04:00
Francis Dinh
54f6628590 Change argument order and call correct # of args 2018-05-08 23:59:36 -04:00
Francis Dinh
e55f69a676 Handle Undo activites containing an Announce 2018-05-08 23:50:19 -04:00
Francis Dinh
4d5ec883b7 Federate correct activity 2018-05-08 21:52:21 -04:00
lain
ffe028cd73 More warning fixes. 2018-05-07 18:11:37 +02:00
lambda
6c2903d9a1 Merge branch 'feld-warnings' into 'develop'
Clean up warnings

See merge request pleroma/pleroma!144
2018-05-06 18:42:31 +00:00
eal
bfad57c7c9 Get rid of unsafe variables. 2018-05-06 09:58:59 +03:00
7a884d70d8 Group def renders here as well 2018-05-04 22:31:46 +00:00
14c0c6d16b Fix formatting 2018-05-04 22:03:14 +00:00
a24eed0f57 That last change was stupid. Multiline comments in Elixir don't really exist.
Instead we'll just pad with # intstead of playing stupid games with the compiler.
2018-05-04 21:53:52 +00:00
79d41aa12e Dirty hack to remove the warning
warning: code block contains unused literal "internal -> Mastodon\n" (remove the literal or assign it to _ to avoid warnings)
  lib/pleroma/web/activity_pub/transmogrifier.ex
2018-05-04 21:48:30 +00:00
aaacebd906 Fix unused variables, imports, and aliases 2018-05-04 21:42:20 +00:00
42f1a098aa Fix build. Too eager with the fixing of unused variables.
== Compilation error in file lib/pleroma/web/activity_pub/views/user_view.ex ==
** (CompileError) lib/pleroma/web/activity_pub/views/user_view.ex:54: undefined function _total/0
    (stdlib) lists.erl:1338: :lists.foreach/2
    (stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
2018-05-04 21:26:33 +00:00
636f0fa402 Clean up unused aliases and imports 2018-05-04 21:25:31 +00:00
943820ae29 More unused variables 2018-05-04 21:16:02 +00:00
ab4aa5720a Fix a bunch of unused variable warnings 2018-05-04 20:59:01 +00:00
William Pitcock
a3d1d4894f ActivityPub core: fix handling of unlisted statuses by leveraging a similar strategy as for blocks 2018-04-28 22:32:46 -05:00
lain
4d55d7c95e Insert object after being rewritten. 2018-04-28 16:10:24 +02:00
lambda
a7a40bb8f1 Merge branch 'fix/blocked-user-boosts' into 'develop'
ActivityPub.ex: do not return boosted statuses from blocked users.

See merge request pleroma/pleroma!111
2018-04-28 13:49:12 +00:00
William Pitcock
90bbd94614 ActivityPub MRF SimplePolicy: fix media stripping 2018-04-25 16:28:53 -05:00
Francis Dinh
2d775bf1be Merge branch 'feature/unrepeats' of git.pleroma.social:normandy/pleroma into feature/unrepeats 2018-04-25 01:58:50 -04:00
Francis Dinh
9e0dd21ed6 Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into feature/unrepeats 2018-04-25 00:46:28 -04:00
lain
c78e7d8b11 Fix formatting. 2018-04-24 21:25:31 +02:00
lambda
7a52c4549c Merge branch 'feature/message-rewrite-facility' into 'develop'
message rewrite facility

See merge request pleroma/pleroma!112
2018-04-24 17:21:28 +00:00
Dashie
9972678a68
Add User.decrease_note_count and call it from ActivityPub.delete 2018-04-24 11:34:18 +02:00
Francis Dinh
8c0806539c Embed announce activity data instead of linking to it 2018-04-22 21:28:51 -04:00
Francis Dinh
b1742eca42 Revert "Rename make_unannounce_data helper to make_undo_data"
This reverts commit c649ca8958.
2018-04-22 19:42:28 -04:00
Francis Dinh
c649ca8958 Rename make_unannounce_data helper to make_undo_data
This makes it a bit more easier to adapt for unlikes as well in the
future.
2018-04-22 01:55:41 -04:00
eal
22bfeac256 Update note count in ActivityPub.create. 2018-04-21 12:58:04 +03:00
lain
9e6ae44729 Formatting fixes. 2018-04-21 09:43:53 +02:00
Francis Dinh
f0798440de Use correct activity for undo 2018-04-20 23:22:16 -04:00
Francis Dinh
4b9f2ab526 Fix federation of unreblog activity 2018-04-20 23:09:19 -04:00
nenolod@dereferenced.org
f08f9d4498 ActivityPub MRF: fix nsfw tagging of objects with attachments by looking at the right object (the child in this case) 2018-04-19 07:45:09 -05:00
Francis Dinh
7b4f55238e Handle unrepeats via the TwitterAPI 2018-04-18 06:00:40 -04:00