Commit Graph

224 Commits

Author SHA1 Message Date
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
lain 9e0686efa6 Move visibility into own module. 2019-02-22 13:29:52 +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
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
Haelwenn (lanodan) Monnier 6a6a5b3251
de-group alias/es 2019-02-09 16:31:17 +01:00
Haelwenn (lanodan) Monnier 60ea29dfe6
Credo fixes: alias grouping/ordering 2019-02-09 14:59:20 +01:00
William Pitcock e71ab5a10f activitypub: transmogrifier: fix bare tags 2019-02-05 00:43:28 +00:00
William Pitcock cbb2b709de activitypub: transmogrifier: fix follow request rejections 2019-01-29 11:57:46 +00:00
href 77f2137383
Transmogrifier: fix incoming objects with invalid likes 2019-01-27 19:33:21 +01:00
kaniini 4df71cd88b Merge branch 'classic-flakeids' into 'develop'
Flake Ids for Users and Activities

Closes #450

See merge request pleroma/pleroma!645
2019-01-25 04:59:06 +00:00
lain 2de208817c Merge branch 'develop' into rename/pleroma_activity_consistency 2019-01-23 13:05:58 +01:00
href 28d77e373c
Flake Ids for Users and Activities 2019-01-23 11:26:27 +01:00
Haelwenn (lanodan) Monnier 98c8184c1f
Activity: get_create_activity_by_object_ap_id/1 → get_create_by_object_ap_id/1 2019-01-21 08:00:41 +01:00
William Pitcock 7c9749f793 transmogrifier: slightly clean up fix_explicit_addressing pipeline 2019-01-20 02:27:48 +00:00
William Pitcock 420651157b transmogrifier: don't apply heuristics against messages which have `directMessage` set true 2019-01-20 02:27:48 +00:00
William Pitcock 681f40ee5c activitypub: transmogrifier: fix up to/cc addressing brain damage caused by mastodon-style explicit DMs 2019-01-20 02:27:48 +00:00
William Pitcock dbc4e92509 activitypub: transmogrifier: do not clobber the addressing on relayed announcements 2019-01-17 23:21:31 +00:00
sxsdv1 868034375c Add likes to activitypub object representation
Top level of the likes OrderedCollection is inlined to get immediate
access to totalItems. Because the count can be returned without scanning
the database for like activities the extra query is saved when the
client only wants to display the total.
2019-01-12 20:24:41 +01:00
sxsdv1 1eb7318831 Prepare all types objects before serialising
Activities returned from inbox can include other types of objects like
Article
2019-01-12 20:24:32 +01:00
William Pitcock 980b5288ed update copyright years to 2019 2018-12-31 15:41:47 +00:00
William Pitcock 2791ce9a1f add license boilerplate to pleroma core 2018-12-23 20:56:42 +00:00
William Pitcock 71f6d9f418 transmogrifier: significantly rework handling of peertube videos, add test 2018-12-23 13:31:08 +00:00
Haelwenn (lanodan) Monnier 3aff8067e4 transmogrifier: When it’s a Video move "url" to "attachment" 2018-12-23 13:00:25 +00:00
Maksim Pechnikov 074fa790ba fix compile warnings 2018-12-09 20:50:08 +03:00
William Pitcock b3b52b58c3 activitypub: transmogrifier: remove obsolete fetch_obj_helper() 2018-12-04 04:52:09 +00:00
William Pitcock f85949cc69 object: factor out fetching functions into Pleroma.Object.Fetcher module 2018-12-04 04:52:09 +00:00
William Pitcock e8caecb5c7 object: move object containment out of transmogrifier into it's own module 2018-12-04 04:52:09 +00:00
William Pitcock cf139e3eec activitypub: transmogrifier: ensure we send nested object in Create 2018-12-04 04:52:09 +00:00
lain 8f1fffebc6 Fix transmogrifier test. 2018-11-30 17:31:05 +01:00
lain 40d9d2098c Fix user updating from AP. 2018-11-18 22:15:03 +01:00
William Pitcock dfcfb184b1 activitypub: transmogrifier: make deletes secure 2018-11-17 21:22:57 +00:00
William Pitcock daa8ec3d62 activitypub: factor out AP object fetching to it's own function and add ID-based containment 2018-11-17 20:15:59 +00:00
William Pitcock 97e50f3191 activitypub: transmogrifier: sanitize internal representation details from outgoing objects
this causes JSON-LD parsers to get upset and has also lead to developer confusion from outside
projects which tried to parse our internal data.  accordingly, it seems better to just remove
it.
2018-11-10 12:24:20 +00:00
William Pitcock 6b4064fa5d activitypub: transmogrifier: unify mention extraction 2018-11-08 19:41:36 +00:00
William Pitcock 3e33479c05 activitypub: transmogrifier: only consider `to` users as mention targets 2018-11-08 18:58:27 +00:00
lambda 59cf7cf235 Merge branch 'small-jsonld-refactor' into 'develop'
Small jsonld refactor

See merge request pleroma/pleroma!433
2018-11-08 16:23:58 +00:00
lain 34bd411781 Unify json ld header handling. 2018-11-08 16:39:38 +01:00
href 5bb88fd174
Runtime configuration
Related to #85

Everything should now be configured at runtime, with the exception of
the `Pleroma.HTML` scrubbers (the scrubbers used can be
changed at runtime, but their configuration is compile-time) because
it's building a module with a macro.
2018-11-06 19:41:15 +01:00
William Pitcock 9f03b5c4f7 activitypub: transmogrifier: add support for Page objects 2018-11-01 09:59:43 +00:00
Haelwenn (lanodan) Monnier b2da5262ea
Pleroma.Web.ActivityPub.Transmogrifier: fix_url when not a string/empty
Thanks prismo.news, I hate it
2018-11-01 09:56:37 +01:00
William Pitcock 5383887bd4 transmogrifier: do not try to contain origin of something which doesn't have one 2018-10-25 04:27:33 +00:00
William Pitcock 8ce217776d activitypub transmogrifier: better manage follow state 2018-10-05 23:30:34 +00:00
Haelwenn (lanodan) Monnier c739737998
transmogrifier: get_actor called without casting attributedTo in actor and actor is nil 2018-09-27 20:00:48 +02:00
Haelwenn (lanodan) Monnier 9446b02bdf
transmogrifier: Just make attachement maps into a list and reroll 2018-09-27 20:00:48 +02:00
Haelwenn (lanodan) Monnier e53da692fb
transmogrifier: Use the correct variable and prefer inspect in case of a bad type being passed on 2018-09-27 20:00:48 +02:00
William Pitcock d830a243a3
transmogrifier: more robustly handle dereferencing pointer URIs 2018-09-27 20:00:48 +02:00
Haelwenn (lanodan) Monnier 4c3a80de96
transmogrifier: Use oneliners when applicable 2018-09-27 20:00:47 +02:00
William Pitcock ed8dfa3029
transmogrifier: reformat `cond` block by hand 2018-09-27 20:00:47 +02:00
Haelwenn (lanodan) Monnier eebe33e86a
transmogrifier: Add support for array-less hashtags, add broken announce, harden get_actor 2018-09-27 20:00:47 +02:00
Haelwenn (lanodan) Monnier f3291acc91
transmogrifier: pro-actively add support for Hashtag without array in tag 2018-09-27 20:00:47 +02:00
Haelwenn (lanodan) Monnier 22927f3a34
transmogrifier: Use a cond, add proactive support for arrays 2018-09-27 20:00:46 +02:00
Haelwenn (lanodan) Monnier 0aac72f1d3
[Pleroma.Web.ActivityPub.Transmogrifier]: quick fix when tag is a Map 2018-09-27 20:00:46 +02:00
Haelwenn (lanodan) Monnier 28e8a8ab36
[Pleroma.Web.ActivityPub.Transmogrifier]: fix emoji in tag when it’s not in a array [kroeg]
Also simplified the code for name trimming.

And not copying the Map.merge part as it looks buggy.
See: https://queer.hacktivis.me/objects/a9f21ebc-9a12-4a6c-89d5-3d46955c6ee8
2018-09-27 20:00:46 +02:00
Haelwenn (lanodan) Monnier f8a0cb9c0b
[Pleroma.Web.ActivityPub.Transmogrifier]: fix when attachment contain is just a Map [kroeg] 2018-09-27 20:00:46 +02:00
Haelwenn (lanodan) Monnier a4abb124ea
[Pleroma.Web.ActivityPub.Transmogrifier]: Fix when inReplyTo is a inlined post [kroeg] 2018-09-27 20:00:46 +02:00
William Pitcock d3248e13e3 activitypub: transmogrifier: allow profile updates from bots 2018-09-10 01:57:03 +00:00
William Pitcock 03e92977cb transmogrifier: fix peertube/plume actor handling 2018-09-01 23:44:19 +00:00
William Pitcock 0b2c051a04 activitypub: fix possibility of spoofing by containing remote objects to the same domain as their actor 2018-09-01 23:20:02 +00:00
William Pitcock 52b44184b4 transmogrifier: reject activities lacking a valid ID 2018-08-23 01:25:26 +00:00
Haelwenn (lanodan) Monnier f5b056e3ce
[Pleroma.Web.ActivityPub.Transmogrifier]: Fix likes 2018-08-21 18:26:12 +02:00
Haelwenn (lanodan) Monnier 74c74decf5
Basic peertube support. 2018-08-21 18:24:09 +02:00
Haelwenn (lanodan) Monnier ef4f982e2c
Pleroma.Web.ActivityPub.Transmogrifier: Fix actor being a list of objects (Peertube) 2018-08-21 18:24:06 +02:00
William Pitcock f446e75577 activitypub: transmogrifier: add necessary translations for kroeg 2018-08-14 17:09:11 +00:00
Haelwenn (lanodan) Monnier 7501481db4
[Pleroma.Web.ActivityPub.Transmogrifier] Add Person finding 2018-07-12 23:37:07 +02:00
Haelwenn (lanodan) Monnier 8472fba2a7
[Pleroma.Web.ActivityPub.Transmogrifier]: Fix actor key outside of object
The code here is copied from feature/peertube by lain.

Co-authored-by: lain <lain@soykaf.club>
2018-07-12 23:37:00 +02:00
lambda d93789dfde Merge branch 'feature/object-normalization' into 'develop'
object normalization

See merge request pleroma/pleroma!238
2018-07-12 16:48:15 +00:00
William Pitcock 590d4df77c activitypub: more robustly handle object-to-actor associations 2018-07-12 16:39:03 +00:00
William Pitcock 971bb4f2bd activity interpretation: formatting 2018-06-27 13:38:19 +00:00
William Pitcock c42f28b82c transmogrifier: accept Article activities 2018-06-27 13:37:26 +00:00
William Pitcock 7c63e70de1 activitypub: use Activity.normalize() in several places instead of using Activity.get_by_ap_id() directly. 2018-06-27 13:08:12 +00:00
William Pitcock 15d624e077 activitypub: use Object.normalize() instead of Object.get_by_ap_id() directly. 2018-06-27 13:07:29 +00:00
William Pitcock c95941e64d activitypub transmogrifier: fix handling of contentMap. 2018-06-18 22:14:50 +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
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 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 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
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
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
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
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