Commit Graph

187 Commits

Author SHA1 Message Date
lain 59bdef0c33 Merge branch 'feature/1739-account-endpoints' into 'develop'
account visibility in masto api

Closes #1739

See merge request pleroma/pleroma!2488
2020-06-22 12:37:10 +00:00
Sergey Suprunenko ac0344dd24
Only accounts with Service actor_type are considered as bots 2020-06-19 21:19:00 +02:00
rinpatch 4ec2fb967e Merge branch 'features/users-raw_bio' into 'develop'
User: Add raw_bio, storing unformatted bio

See merge request pleroma/pleroma!2326
2020-06-17 10:34:23 +00:00
Haelwenn (lanodan) Monnier e1b07402ab
User: Add raw_bio, storing unformatted bio
Related: https://git.pleroma.social/pleroma/pleroma/issues/1643
2020-06-06 16:23:16 +02:00
lain af6d01ec93 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms 2020-05-29 12:36:17 +02:00
rinpatch 8f6d428880 AccountView: Use mediaproxy URLs for emojis
Also use atom keys in emoji maps instead of binaries

Closes #1810
2020-05-27 19:44:02 +03:00
Alexander Strizhakov 1671864d88
return :visible instead of boolean 2020-05-18 10:34:50 +03:00
Alexander Strizhakov e7bc2f980c
account visibility 2020-05-18 10:34:49 +03:00
lain 9c17109765 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms 2020-05-17 12:14:49 +02:00
lain 3cff4e24cd Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms 2020-05-13 12:44:16 +02:00
Ivan Tashkinov fd2fb2bb2e Merge remote-tracking branch 'remotes/origin/develop' into restricted-relations-embedding
# Conflicts:
#	lib/pleroma/web/mastodon_api/controllers/status_controller.ex
#	lib/pleroma/web/mastodon_api/controllers/timeline_controller.ex
#	test/web/mastodon_api/controllers/timeline_controller_test.exs
#	test/web/mastodon_api/views/status_view_test.exs
2020-05-13 12:42:36 +03:00
Egor Kislitsyn 7803a85d2c
Add OpenAPI spec for StatusController 2020-05-13 00:25:21 +04:00
Ivan Tashkinov 63a1a82f38 [#2456] Added support for `embed_relationships` param, nailed down endpoints which should support it. Fixed :source_mutes relationships subset fetching. 2020-05-12 19:14:35 +03:00
lain dcb5cda324 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms 2020-05-12 13:13:43 +02:00
Ivan Tashkinov aee88d11be [#2456] Removed support for embedded relationships in account view. 2020-05-10 09:16:48 +03:00
Ivan Tashkinov ac4250a18c [#2456] Clarified `skip_relationships` option (and its default of `false`) for MastodonAPI.AccountView. 2020-05-09 19:03:07 +03:00
Ivan Tashkinov b2924ab1fb Merge remote-tracking branch 'remotes/origin/develop' into restricted-relations-embedding 2020-05-08 21:37:55 +03:00
lain 7637ef4203 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms 2020-05-08 13:13:37 +02:00
Maksim Pechnikov 4d71c4b805 fixed 'source' object in verify_credentials 2020-05-08 12:35:34 +03:00
Maksim Pechnikov bd261309cc added `unread_notifications_count` for `/api/v1/accounts/verify_credentials` 2020-05-06 15:08:38 +03:00
Ivan Tashkinov d5cdc907e3 Restricted embedding of relationships where applicable (statuses / notifications / accounts rendering).
Added support for :skip_notifications for accounts listing (index.json).
Adjusted tests.
2020-05-01 18:45:24 +03:00
lain 8c2c325598 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms 2020-04-17 15:51:24 +02:00
rinpatch 942d7467ca Merge branch 'develop' into features/remove-user-source_data 2020-04-16 21:28:52 +03:00
lain ca598e9c27 AccountView: Return user ap_id. 2020-04-16 15:27:35 +02:00
Ivan Tashkinov a21baf89d8 Merge remote-tracking branch 'remotes/origin/develop' into output-of-relationships-in-statuses 2020-04-13 09:16:51 +03:00
rinpatch 5e365448f3 Merge branch 'following-relationships-optimizations' into 'develop'
FollowingRelationship storage & performance optimizations

See merge request pleroma/pleroma!2332
2020-04-11 19:46:04 +00:00
Haelwenn (lanodan) Monnier 9172d719cc
profile emojis in User.emoji instead of source_data 2020-04-10 06:20:02 +02: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 (lanodan) Monnier 185520d1b4
Provide known-good user.uri, remove User.profile_url/1 2020-03-31 23:55:29 +02:00
Ivan Tashkinov be9d18461a FollowingRelationship storage & performance optimizations (state turned `ecto_enum`-driven integer, reorganized indices etc.). 2020-03-28 18:49: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 be5e2c4dbb Applied relationships preloading to GET /api/v1/accounts/relationships. Refactoring (User.binary_id/1). 2020-03-25 17:01:45 +03:00
Ivan Tashkinov 8f1d622b8d Merge remote-tracking branch 'remotes/origin/develop' into relations-preloading-for-statuses-rendering 2020-03-24 22:15:37 +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 15be6ba9c2
AccountView: fix for other forms of <br> in bio
Closes: https://git.pleroma.social/pleroma/pleroma/issues/1643
2020-03-22 16:41:01 +01:00
rinpatch 981e015f1b Mastodon API Account view: Remove an outdated hack
The hack with caching the follow relationship was introduced
when we still were storing it inside the follow activity, resulting in
slow queries. Now we store follow state in `FollowRelationship` table,
so this is no longer necessary.
2020-03-22 17:10:37 +03:00
Haelwenn (lanodan) Monnier 8176ca9e40 static_fe: Sanitize HTML in users 2020-03-15 20:44:04 +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
rinpatch 983a87175e mastodon API: do not sanitize html in non-html fields 2020-02-02 14:46:32 +03:00
Hakaba Hitoyo 701815e64c [ActivityPub] Configurable ActivityPub actor type 2019-12-10 13:19:26 +00:00
Ivan Tashkinov 30caf3e51e Merge remote-tracking branch 'remotes/upstream/develop' into 1335-user-api-id-fields-relations
# Conflicts:
#	lib/pleroma/user.ex
2019-12-04 18:56:31 +03:00
lain 7722e5a67a Merge branch 'feature/move-activity' into 'develop'
Support "Move" activity

Closes #1316

See merge request pleroma/pleroma!1883
2019-12-02 16:26:19 +00:00
Ivan Tashkinov 52cc7de82c Merge remote-tracking branch 'remotes/upstream/develop' into 1335-user-api-id-fields-relations
# Conflicts:
#	mix.lock
2019-11-29 10:17:59 +03:00
lain 50b152766f Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into bugfix/1442-dont-return-nil-for-following-count 2019-11-27 14:48:28 +01:00
Egor Kislitsyn f595cfe623
Remove User.user_info/2 2019-11-27 19:43:47 +07:00
Ivan Tashkinov c31ddce51e [#1335] Reorganized `users.mutes` as relation to UserMute entity. 2019-11-15 21:38:54 +03:00
Egor Kislitsyn e6d7e27bd6
Add `allow_following_move` setting to User 2019-11-12 18:45:28 +07: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
eugenijm 8249924485 Mastodon API: Add `pleroma.unread_conversation_count` to the Account entity 2019-10-05 20:12:00 +03:00
kaniini e07e9cb75e Revert "Merge branch 'user-info-unread-direct-conversation' into 'develop'"
This reverts merge request !1737
2019-10-05 10:00:05 +00:00
eugenijm 06d9df79c5 Mastodon API: Add `pleroma.unread_conversation_count` to the Account entity 2019-10-04 00:53:23 +03:00
Egor Kislitsyn e7aef27c00
Fix merge 2019-09-30 19:10:54 +07:00
Ariadne Conill 14294243a2 mastodon api: implement follow_requests_count 2019-09-27 04:22:40 +00:00
Hakaba Hitoyo 5fb72170a7 Revert "add _discoverable_ keyword into ActivityPub @context"
This reverts commit 3aef4bdf8f37efd1055a84c5fca12ec4559a17f5.
2019-09-26 02:57:41 +00:00
eugenijm 450bf7a63c Mastodon API: Add a setting to hide follow/follower count from the user view (`hide_follows_count` and `hide_followers_count`) 2019-09-17 14:45:47 +03:00
lain ef43016b2c Merge branch 'feature/custom-fields' into 'develop'
Add custom profile fields

See merge request pleroma/pleroma!1488
2019-08-20 12:44:14 +00:00
rinpatch bd5ad0af78 Cache follow state 2019-08-15 00:47:30 +03:00
Egor Kislitsyn f7bbf99caa Use info.fields instead of source_data for remote users 2019-08-14 14:52:54 +07:00
Egor Kislitsyn e0ac5c7a66 Add custom profile fields 2019-08-14 14:52:54 +07:00
rinpatch 409bcad54b Mastodon API: Set follower/following counters to 0 when hiding
followers/following is enabled

We are already doing that in AP representation, so I think we should do
it here as well for consistency.
2019-08-09 16:53:55 +03:00
Thibaut Girka 9c0da1009a Return profile URL in MastodonAPI's `url` field 2019-08-07 21:40:53 +00:00
Thibaut Girka 089d53a961 Simplify logic to mention.js `url` field
`User.profile_url` already fallbacks to ap_id
2019-08-07 20:55:37 +00:00
Thibaut Girka a10c840aba Return profile URL when available instead of actor URI for MastodonAPI mention URL
Fixes #1165
2019-08-07 20:29:30 +00:00
Eugenij 4504135894 Add `domain_blocking` to the relationship API (GET /api/v1/accounts/relationships) 2019-07-24 15:12:27 +00:00
Eugenij 520ee6c591 Add `pleroma.deactivated` to the Account entity (Mastodon API) 2019-07-16 11:14:46 +00:00
Eugenij c4ca142e14 Add the `blocked_by` attribute to the relationship API (`GET /api/v1/accounts/relationships`) 2019-07-16 11:04:11 +00:00
Alexander Strizhakov e7c39b7ac8 Feature/1072 muting notifications 2019-07-14 13:29:31 +00:00
rinpatch c7acca2abb Mastodon API: Sanitize display names
Closes #1000
2019-06-18 14:12:11 +03:00
lain a440cf856d Mastodon API: Return the token needed for the chat. 2019-06-15 10:59:35 +02:00
lain 5965efb216 AccountView: Add user background. 2019-06-13 19:08:05 +02:00
Maksim Pechnikov 4f2e359687 Merge branch 'develop' into issue/941 2019-06-04 09:49:08 +03:00
Maksim Pechnikov f13d6c7f78 update api to set skip_thread_containment 2019-06-03 21:02:57 +03:00
lain aaad85c4d9 AccountView: settings -> settings_store 2019-05-31 14:49:46 +02:00
lain eb2963bc43 User: Add settings store to Info, AccountView
This is to provide a generic frontend settings storage mechanism for all kinds
of frontends.
2019-05-31 14:27:15 +02:00
Haelwenn (lanodan) Monnier 0e2c215a00
MastoAPI AccountView: fill source.note with plaintext version of note
Closes: https://git.pleroma.social/pleroma/pleroma/issues/926
2019-05-22 07:22:19 +02:00
lambda 46684db84d Update account_view.ex 2019-05-17 09:53:44 +00:00
Haelwenn (lanodan) Monnier 68c75a08e8
MastoAPI account_view.ex: requested is false when following is true
Closes: https://git.pleroma.social/pleroma/pleroma/issues/903
2019-05-17 07:44:09 +02:00
rinpatch dfc8425659 Move settings to Source subentity 2019-04-25 10:31:14 +03:00
rinpatch 4baea6e6d9 Fix leaking private configuration parameters in Mastodon and Twitter APIs, and add new configuration parameters to Mastodon API
This patch:
- Fixes `rights` in twitterapi ignoring `show_role`
- Fixes exposing default scope of the user to anyone in Mastodon API
- Extends Mastodon API to be able to show and set `no_rich_text`, `default_scope`, `hide_follows`, `hide_followers`, `hide_favorites` (requested by the FE in #674)

Sorry in advance for 500 line one commit diff, I should have split it up to separate MRs
2019-04-24 20:01:42 +03:00
Egor b9cdf6d3b9 Use `User.get_cached*` everywhere 2019-04-22 07:20:43 +00:00
Sadposter be8350baa2
Merge branch 'develop' into feature/user-status-subscriptions 2019-04-10 10:44:54 +01:00
Sadposter 9ca91cbb87 Change relationship direction of subscriptions 2019-04-05 17:02:07 +01:00
eugenijm cd90695a34 Add PUT /api/pleroma/notification_settings endpoint 2019-03-28 18:55:16 +03:00
Karen Konou c8f31e0bc2 Implement mastodon's reblog hiding feature 2019-03-15 14:18:21 +01:00
William Pitcock 1536640962 mastodon api: embed relationship card under account card for Pleroma FE convenience 2019-02-27 13:01:10 +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
Haelwenn (lanodan) Monnier 6a6a5b3251
de-group alias/es 2019-02-09 16:31:17 +01:00
Haelwenn (lanodan) Monnier 8bcfac93a8
Make credo happy 2019-02-09 14:59:20 +01:00
Haelwenn (lanodan) Monnier a65c188593
Web.MastodonAPI.AccountView: Add is_moderator and is_admin
Closes: https://git.pleroma.social/pleroma/pleroma/issues/557
2019-01-27 10:33:22 +01:00
William Pitcock 980b5288ed update copyright years to 2019 2018-12-31 15:41:47 +00:00
Ivan Tashkinov 0a41786624 [#467] Refactored valid / invalid user rendering. 2018-12-28 22:47:42 +03:00
Ivan Tashkinov 0d1788ce44 [#471] Factored out User.visible_for?/2. 2018-12-28 14:35:25 +03:00
Ivan Tashkinov e6aeb1d4a5 [#471] Prevented rendering of inactive local accounts. 2018-12-27 15:46:18 +03:00
William Pitcock 2791ce9a1f add license boilerplate to pleroma core 2018-12-23 20:56:42 +00:00