Commit graph

142 commits

Author SHA1 Message Date
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