Commit graph

195 commits

Author SHA1 Message Date
Egor Kislitsyn
f1ca917bb0
Merge branch 'develop' into openapi/account 2020-04-27 14:33:00 +04:00
Ivan Tashkinov
e16437ff19 [#1706] Formatting fix. 2020-04-25 18:42:08 +03:00
Ivan Tashkinov
0d05e1fe39 [#1706] Prevented error on unresolved activity actors for timeline actions. 2020-04-25 18:24:10 +03:00
Egor Kislitsyn
03124c96cc
Add spec for AccountController.statuses 2020-04-13 18:17:07 +04:00
Ivan Tashkinov
3fa51f7272 Merge remote-tracking branch 'remotes/origin/2323-accounts-relationships-hotfix' into output-of-relationships-in-statuses
# Conflicts:
#	lib/pleroma/web/mastodon_api/views/account_view.ex
#	lib/pleroma/web/mastodon_api/views/status_view.ex
2020-04-02 19:38:39 +03:00
Ivan Tashkinov
aa78325117 [#2323] Fixed a typo causing /accounts/relationships to render default relationships. Improved the tests. 2020-04-02 19:23:30 +03:00
Ivan Tashkinov
2f2bd7fe72 Ability to control the output of account/pleroma/relationship in statuses in order to improve the rendering performance.
See `[:extensions, output_relationships_in_statuses_by_default]` setting and `with_relationships` param.
2020-04-01 19:49:09 +03:00
Haelwenn
e999c67cee Merge branch 'feature/funkwhale-audio' into 'develop'
Add support for funkwhale Audio activity

Closes #764 and #1624

See merge request pleroma/pleroma!2287
2020-03-29 19:18:22 +00:00
Ivan Tashkinov
dfbc05d496 Misc refactoring / tweaks (ThreadMute.exists?/2). 2020-03-27 08:01:03 +03:00
Ivan Tashkinov
6b793d3f83 Ensured no auxiliary computations (actors list preparation etc.) related to relationships preloading if no user is present (for statuses / accounts / relationships rendering). 2020-03-26 21:54:01 +03:00
Ivan Tashkinov
460e41585c Further preloading (more endpoints), refactoring, tests. 2020-03-25 20:33:34 +03:00
Ivan Tashkinov
13cbb9f6ad Implemented preloading of relationships with parent activities' actors for statuses/timeline rendering. Applied preloading for notifications rendering. Fixed announces rendering issue (preloading-related). 2020-03-24 22:14:26 +03:00
Ivan Tashkinov
3c78e5f327 Preloading of follow relations for timeline/statuses rendering (performance improvement). Refactoring. 2020-03-23 12:01:11 +03:00
Ivan Tashkinov
c2e415143b WIP: preloading of user relations for timeline/statuses rendering (performance improvement). 2020-03-22 21:51:44 +03:00
Haelwenn (lanodan) Monnier
863ec33ba2
Add support for funkwhale Audio activity
reel2bits fixture not included as it lacks the Actor fixture for it.

Closes: https://git.pleroma.social/pleroma/pleroma/issues/1624
Closes: https://git.pleroma.social/pleroma/pleroma/issues/764
2020-03-11 13:46:42 +01:00
Haelwenn (lanodan) Monnier
6da6540036
Bump copyright years of files changed after 2020-01-07
Done via the following command:
git diff fcd5dd259a --stat --name-only | xargs sed -i '/Pleroma Authors/c# Copyright © 2017-2020 Pleroma Authors <https:\/\/pleroma.social\/>'
2020-03-02 06:08:45 +01:00
Egor Kislitsyn
2ef70b55f5
Fix status.expires_at type 2020-02-18 14:52:11 +04:00
Haelwenn (lanodan) Monnier
1257331291
MastodonAPI.StatusView: Do not use site_name
site_name allow to spoof the origin of the domain and so hacks like:

<!-- served on https://hacktivis.me/tmp/joinmastodon.org.html -->
<meta property="og:image" content="https://hacktivis.me/datalove/img/meme/pleroma/mastodon%2C%20forbidden%20amuse%20yourself.jpeg" />
<meta property="og:title" content="Mastodon: Forbidden Amuse Yourself" />
<meta property="og:site_name" content="joinmastodon.org" />
<meta http-equiv="refresh" content="0; url=http://joinmastodon.org/">
2020-02-15 00:36:09 +01:00
Lain Soykaf
f875b9650a EmojiReactions: Add Mastodon-aligned reaction endpoints, change response 2020-02-07 14:52:13 +01:00
df0b00b32d Merge branch 'mastoapi-non-html-strings' into 'develop'
mastodon API: do not sanitize html in non-html fields

See merge request pleroma/pleroma!2167
2020-02-06 16:08:23 +00:00
rinpatch
983a87175e mastodon API: do not sanitize html in non-html fields 2020-02-02 14:46:32 +03:00
lain
a802e07241 Emoji Reactions: Add reacted field to emoji reactions 2020-01-29 11:39:06 +01:00
lain
347f3ed2c6 Emoji reactions: Change api format once more 2020-01-24 10:52:24 +01:00
lain
dd3fc50ea4 Emoji reactions: Change cache and reply format 2020-01-22 13:57:42 +01:00
lain
4c5b5f14dc StatusView: Add emoji_reactions 2020-01-20 16:24:20 +01:00
d2f1c4f658
Add ActivityPub Object Event type support
Adds Event support in the same way Video objects are handled, with the
name of the object as message header.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2019-12-17 16:16:21 +01:00
Egor Kislitsyn
80ededc04f
Add direct_conversation_id to web push payload 2019-11-26 19:53:43 +07:00
eugenijm
ed29be24cb Mastodon API, streaming: Add pleroma.direct_conversation_id to the conversation stream event payload. 2019-11-04 18:36:16 +03:00
Ivan Tashkinov
10ff01acd9 [#1304] Moved all non-mutes / non-blocks fields from User.Info to User. WIP. 2019-10-16 21:59:21 +03:00
Thibaut Girka
43e3db0951 Fix returned visibility of announces in MastodonAPI 2019-10-01 20:38:29 +02:00
Egor Kislitsyn
36a34c36fe
Extract poll actions from MastodonAPIController to PollController 2019-10-01 11:44:34 +07:00
Egor Kislitsyn
e7aef27c00
Fix merge 2019-09-30 19:10:54 +07:00
Ariadne Conill
7cad6ea67a pleroma api: hook up scrobbler controller 2019-09-30 10:39:17 +00:00
Ariadne Conill
b7877e9b1c mastodon api: implement rendering of listen activities 2019-09-30 10:39:17 +00:00
Maksim Pechnikov
1053319cd6 Merge branch 'develop' into tests/mastodon_api_controller.ex 2019-09-28 10:36:04 +03:00
Egor Kislitsyn
5ea5c58a85 Move view logic from StatusController.context to StatusView and add a test 2019-09-27 10:52:47 +07:00
Egor Kislitsyn
98d1347a4e Extract status actions from MastodonAPIController into StatusController 2019-09-27 10:51:15 +07:00
Maksim Pechnikov
494bb6bac6 updated tests 2019-09-23 22:37:30 +03:00
Haelwenn
46ae62d159 Merge branch 'patch-5' into 'develop'
Mastodon API: URI encode hashtag name in generated URLs

See merge request pleroma/pleroma!1642
2019-09-11 17:47:19 +00:00
rinpatch
43f02dfe38 Revert "Parallelize template rendering"
This reverts commit 1ad71592ad.

Since it had no limit on the number on concurrent processes it OOM killed
instances while rendering hellthreads. When I tried introducing a
concurrency limit with Task.async_stream/manual folds it lead to about 3 times
worse performance on threads larger than 1000 activities (we are talking
30s vs 1.2 minutes), I think this is not worth the about 1.5 times
performance increase on smaller threads when using it.
2019-09-10 22:01:45 +03:00
e5c6bf3673 Mastodon API: URI encode hashtag name in generated URLs
Otherwise hashtags with word characters other than those allowed in URLs (e.g. Japanese characters) produce hashtag URLs that are invalid.
2019-09-07 19:50:45 +00:00
rinpatch
b312ca3d52 Mastodon API Poll view: Fix handling of polls without an end date 2019-09-05 12:03:39 +03:00
rinpatch
3face45467 Mastodon API: Add pleroma.thread_muted to Status entity
Needed for pleroma-fe!941
2019-09-04 14:17:23 +03:00
lain
cc6c0b4ba6 Merge remote-tracking branch 'origin/develop' into sixohsix/pleroma-post_expiration 2019-08-24 15:48:33 +02:00
lain
7ab2dbbdb6 Merge branch 'pleroma-conversations' into 'develop'
Extended Pleroma Conversations

See merge request pleroma/pleroma!1535
2019-08-16 12:55:33 +00:00
rinpatch
1ad71592ad Parallelize template rendering 2019-08-15 18:05:50 +03:00
lain
560dbad538 Merge remote-tracking branch 'origin/develop' into pleroma-conversations 2019-08-14 15:30:40 +02:00
rinpatch
c1b6952d2a Mastodon API: Preloading and normalization optimizations
- Try to normalize the activity instead of object wherever possible
- Put the `user` key on non-home timelines as well so bookmarks and
thread mutes are preloaded there as well
- Skip trying to get the user when rendering mentions if the id ==
as:Public or user's follower collection
- Preload the object when getting replied to activities and do not crash
if it's not present

This almost solves the problem of Pleroma hammering the db with a lot
of queries when rendering timelines, the things left are
1. When rendering mentions and the user is not in cache, save it for
later and request all uncached users in one go
2. Somehow get rid of needing to get the latest follow activity to
detect the value of `requested` in a relationship. (create a database
view for user relationship and cache it maybe?)
2019-08-13 20:34:34 +03:00
rinpatch
0802a08871 Mastodon API: Fix thread mute detection
It was calling CommonAPI.thread_muted? with post author's account
instead of viewer's one.
2019-08-10 16:27:46 +03:00
lain
7483679a7b StatusView: Return direct conversation id. 2019-07-31 15:12:29 +02:00