Commit Graph

452 Commits

Author SHA1 Message Date
rinpatch 6069d0fd36 Fix object search depending on embeded object 2019-04-18 09:28:20 +03:00
rinpatch ad681877df Make credo happy 2019-04-17 14:52:01 +03:00
rinpatch e641651e2b Fix unbookmarking 2019-04-17 14:27:02 +03:00
rinpatch b09ae02c04 Added some more normalization calls all in mastodon api controller 2019-04-17 13:04:58 +03:00
rinpatch 627e5a0a49 Merge branch 'develop' into feature/database-compaction 2019-04-17 12:22:32 +03:00
lain 76999c73a7 Conversation: Add accounts to output. 2019-04-15 22:28:42 +02:00
lain 0da985182f Conversation: Return full status object, id is a string. 2019-04-15 21:58:58 +02:00
eugenijm 27d78dc526 Use User.get_cached_by* 2019-04-15 12:37:49 +03:00
eugenijm 507e7821e3 Handle follow/unfollow directed to themselves 2019-04-15 10:21:18 +03:00
lambda 0a09692c7d Merge branch 'features/mastoapi/2.6.0-min_id-pagination' into 'develop'
Features: mastoapi-2.6.0 `min_id` pagination

Closes #351

See merge request pleroma/pleroma!976
2019-04-12 09:34:12 +00:00
Alexander Strizhakov 711ade961e adding destroy multiple for mastofe 2019-04-12 02:28:46 +00:00
lain c352a0aba6 Conversations: Make tests run. 2019-04-10 17:48:31 +02:00
Sadposter be8350baa2
Merge branch 'develop' into feature/user-status-subscriptions 2019-04-10 10:44:54 +01:00
Sadposter 589629cf3e
Used cached user resources in subscriptions 2019-04-08 15:56:14 +01:00
lambda 23067908de Merge branch 'feature/770-add-emoji-tags' into 'develop'
Feature/770 add emoji tags

See merge request pleroma/pleroma!998
2019-04-08 09:50:00 +00:00
eugenijm 2056efa714 Add scheduler for sending scheduled activities to the queue 2019-04-06 23:56:29 +03:00
eugenijm fc92a0fd8d Added limits and media attachments for scheduled activities. 2019-04-06 23:55:58 +03:00
eugenijm b3870df51f Handle `scheduled_at` on status creation. 2019-04-06 23:55:58 +03:00
eugenijm 7bf622ce73 Add scheduled activities 2019-04-06 23:55:58 +03:00
Sadposter c05fe4da0a
Document subscription endpoints, fix typos
Also adds a quick error case on the subscription endpoints
to avoid 500s
2019-04-06 16:20:06 +01:00
Alex S 7410aee886 Merge develop to 770-add-emoji-tags
Merge conflict in test/web/mastodon_api/mastodon_api_controller_test.exs
2019-04-06 20:34:00 +07:00
Sergey Suprunenko 325a268017 Redirect to the referer url after mastofe authorization 2019-04-05 23:36:42 +00:00
Sadposter 9ca91cbb87 Change relationship direction of subscriptions 2019-04-05 17:02:07 +01:00
Haelwenn (lanodan) Monnier af0065a71f
mastodon_api_controller.ex: Add pleroma-tan to initial_state 2019-04-04 09:07:25 +02:00
Alex S fa8483cb80 Merging develop into feature/770-add-emoji-tags
Conflict test/web/twitter_api/util_controller_test.exs
2019-04-02 20:39:52 +07:00
lambda b95cf3d490 Merge branch 'get_by_id' into 'develop'
Replace `Repo.get_by` with existing functions

See merge request pleroma/pleroma!1010
2019-04-02 12:43:28 +00:00
Alex S 9e0567ec52 Merge develop into feature/770-add-emoji-tags 2019-04-02 19:16:29 +07:00
lambda 091baf9316 Merge branch 'features/mastoapi/2.6.0-force-login-option' into 'develop'
MastoAPI 2.6.0 `force_login` option

Closes #734

See merge request pleroma/pleroma!999
2019-04-02 10:57:38 +00:00
Egor Kislitsyn 88d3cb44c3 replace `Repo.get_by(User, nickname: nickname)` with `User.get_by_nickname(nickname)` 2019-04-02 17:47:02 +07:00
Egor Kislitsyn 1b3d921921 change `Repo.get(User, id)` => `User.get_by_id(id)` 2019-04-02 17:01:26 +07:00
Egor Kislitsyn 4212527928 change `Repo.get(Activity, id)` => `Activity.get_by_id(id)` 2019-04-02 16:50:31 +07:00
Ivan Tashkinov 6910fb371b Fixed local MastoFE authentication / `force_login` option. 2019-04-01 17:25:25 +03:00
Alex S 3601f03147 Adding tag to emoji ets table
changes in apis
2019-04-01 17:17:57 +07:00
Haelwenn (lanodan) Monnier c8abef373b
mastodon_api_controller.ex: fallback to first for min_id 2019-03-28 17:23:21 +01:00
Haelwenn (lanodan) Monnier 6b407872b4
mastodon_api_controller.ex: Use min_id in link header instead of since_id 2019-03-28 17:23:21 +01:00
Haelwenn (lanodan) Monnier 6f15224053
activity_pub.ex: Move limit/max_id restrictions to Pagination helpers 2019-03-28 17:18:59 +01:00
eugenijm a4ab60ac54 Add vapid_key to the `POST /api/v1/apps` response 2019-03-26 23:27:37 +03:00
eugenijm 691d1208b5 Add GET /api/v1/apps/verify_credentials 2019-03-26 21:53:28 +03:00
Ivan Tashkinov eef1042b16 Mastodon 2.7.2 instance attributes (registrations, languages). 2019-03-26 16:27:17 +03:00
rinpatch a7f58b3c13 Serve non-public activities in /api/v1/favourites
Fixes #648
2019-03-25 02:15:45 +03:00
Zachary Dunn a2e03d4f3c Initial attempt at updating return type 2019-03-18 13:56:59 +00:00
eugenijm 1588688a11 Added support for exclude_types, limit, and min_id in Mastodon
notifications.

Unify Mastodon-compatible pagination logic.
2019-03-18 11:27:27 +03:00
Karen Konou da53c079db Refactor to store user ap_id, add tests 2019-03-15 14:20:08 +01:00
Karen Konou 15b21d1983 refactor filtering mechanism 2019-03-15 14:18:53 +01:00
Karen Konou c8f31e0bc2 Implement mastodon's reblog hiding feature 2019-03-15 14:18:21 +01:00
eugenijm 100413bf2c Add `is_seen` to MastoAPI notifications, extract rendering logic into separate NotificationView, add tests 2019-03-15 01:35:48 +03:00
kaniini 4e72762322 Merge branch 'mastofe-content-types' into 'develop'
Set content types settings on mastofe endpoint.

See merge request pleroma/pleroma!894
2019-03-13 22:04:23 +00:00
eugenijm e416c344dd Unify unfollow, accept and reject follow requests using CommonAPI 2019-03-13 20:28:36 +03:00
Haelwenn (lanodan) Monnier fb82f6fc7c
[Credo] Remove parentesis on argument-less functions 2019-03-13 04:26:56 +01:00
Haelwenn (lanodan) Monnier a3a9cec483
[Credo] fix Credo.Check.Readability.AliasOrder 2019-03-13 04:26:54 +01:00
kaniini c231ed610a Merge branch 'masto-api-followers-following' into 'develop'
MastoAPI followers/following endpoints

See merge request pleroma/pleroma!924
2019-03-12 16:27:47 +00:00
eugenijm 984b5f8adf MastoAPI followers/following endpoints 2019-03-12 16:01:24 +03:00
lain 3474066f6d MastoAPI Accounts: Add fetching by nickname.
This is to make it easier for the frontends to handle domain.com/users/nickname
urls.
2019-03-11 15:18:32 +01:00
William Pitcock 19afd9f81f http: rework connection timeouts to match hackney docs, enforce 1 second max TCP connection timeout 2019-03-08 22:56:16 +00:00
eugenijm 7342b5a45f Preserve parameters in link headers (Mastodon API) 2019-03-07 09:12:16 +03:00
Maksim bc7570c282 [#647] tests for web push 2019-03-06 13:20:12 +00:00
kaniini 10248d86a2 Merge branch 'unify-follow' into 'develop'
Unify follow code with CommonAPI

Closes #690

See merge request pleroma/pleroma!889
2019-03-04 13:25:32 +00:00
KokaKiwi bf43f055dd Set content types settings on mastofe endpoint. 2019-03-04 12:00:02 +01:00
eugenijm 86e4b48a5e Fix DM visibility for blocking users 2019-03-04 06:24:27 +03:00
eugenijm 594694607c Unify Mastodon and Twitter follow implementations using CommonAPI 2019-03-04 01:00:37 +03:00
Maxim Filippov 5b08b470f6 Add "local" params to users search 2019-03-01 20:13:02 +03:00
lain 9e0686efa6 Move visibility into own module. 2019-02-22 13:29:52 +01:00
lain 62296f5a25 Fix private post card handling. 2019-02-22 12:02:51 +01:00
Egor bff9eb5ef7 Reports 2019-02-20 16:51:25 +00:00
Ivan Tashkinov b574d97c2e [#468] Added support for `push` OAuth scope (Mastodon 2.4+). 2019-02-20 17:27:41 +03:00
Ivan Tashkinov 6fe7acd58e [#468] Merged `upstream/develop`. 2019-02-20 16:48:59 +03: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 da64ea4a55 Implement mastodon mutes endpoint
Aparently i forgot to add it, it gets a list of muted users
2019-02-19 21:49:55 +03:00
Ekaterina Vaartis f41f017bbc Implement muting, add it to the mastodon API 2019-02-19 21:49:55 +03:00
Ivan Tashkinov c0ecbf6669 [#468] Merged `upstream/develop`. 2019-02-19 19:10:55 +03:00
kaniini c23bd05737 Merge branch 'features/flavour-switching' into 'develop'
[MastoAPI] Add switching of frontend flavours

See merge request pleroma/pleroma!807
2019-02-18 04:01:51 +00:00
Ivan Tashkinov bc4f77b10b [#468] Merged `upstream/develop`, resolved conflicts. 2019-02-17 14:07:04 +03:00
Ivan Tashkinov dcf24a3233 [#468] Refactored OAuth scopes' defaults & missing selection handling. 2019-02-17 13:49:14 +03:00
Haelwenn (lanodan) Monnier 4df455f69b
[MastoAPI] Add switching of frontend flavours 2019-02-16 19:50:13 +01:00
Ivan Tashkinov 2a4a4f3342 [#468] Defined OAuth restrictions for all applicable routes.
Improved missing "scopes" param handling.
Allowed "any of" / "all of" mode specification in OAuthScopesPlug.
Fixed auth UI / behavior when user selects no permissions at /oauth/authorize.
2019-02-15 19:54:37 +03: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
Ivan Tashkinov 027adbc9e5 [#468] Refactored OAuth scopes parsing / defaults handling. 2019-02-14 17:03:19 +03:00
Ivan Tashkinov 063baca5e4 [#468] User UI for OAuth permissions restriction. Standardized storage format for `scopes` fields, updated usages. 2019-02-14 00:29:29 +03:00
Karen Konou ac72b578da Merge branch 'develop' into feature/thread-muting 2019-02-11 12:10:49 +01:00
Karen Konou c01ef574c1 Refactor as per Rin's suggestions, add endpoint tests 2019-02-11 12:04:02 +01:00
Karen Konou cc21fc5f53 refactor, status view updating, error handling 2019-02-10 10:42:30 +01: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
Karen Konou 98ec578f4d Merge branch 'develop' into feature/thread-muting 2019-02-08 12:44:02 +01:00
Ivan Tashkinov 2c68cf7e9e OAuth2 security fixes: redirect URI validation, "Mastodon-Local" security breach fix.
(`POST /api/v1/apps` could create "Mastodon-Local" app wth any redirect_uris,
and if that happened before /web/login is accessed for the first time
then Pleroma used this externally created record with arbitrary
redirect_uris and client_secret known by creator).
2019-02-07 22:14:06 +03:00
Karen Konou f4ff4ffba2 Migration and some boilerplate stuff 2019-02-07 17:36:14 +01:00
Mark Felder 74518d0b60 hide_followings was renamed to hide_followers in the FE, but never synced up in the BE
This was a dirty regex replace which worked on my server
2019-02-06 22:34:44 +00:00
Maxim Filippov 16ce129e38 Split hide_network into hide_followers & hide_followings (fixed) 2019-02-03 21:55:04 +03:00
kaniini 486749064f Revert "Merge branch 'feature/split-hide-network' into 'develop'"
This reverts merge request !733
2019-02-01 20:22:58 +00:00
eugenijm d747bd9870 Use String.replace_leading instead of String.replace for getting websocket streaming api url.
Extract the login responsible for obtaining websocket URL into the corresponding
Endpoint function.
2019-02-01 21:58:43 +03:00
Haelwenn (lanodan) Monnier 74c6119f28
MastodonAPI.MastodonAPIController: Return a 404 when we fail to get a list 2019-02-01 18:21:16 +01:00
kaniini 0a82a7e6d6 Merge branch 'feature/split-hide-network' into 'develop'
Split hide_network into hide_followers & hide_followings

See merge request pleroma/pleroma!733
2019-02-01 17:05:29 +00:00
Haelwenn 00d4333373 Merge branch 'features/glitch-soc-frontend' into 'develop'
Features/glitch soc frontend

See merge request pleroma/pleroma!192
2019-01-31 10:16:11 +00:00
href 4aff4efa8d
Use multiple hackney pools
* federation (ap, salmon)
* media (rich media, media proxy)
* upload (uploader proxy)

Each "part" will stop fighting others ones -- a huge federation outbound
could before make the media proxy fail to checkout a connection in time.

splitted media and uploaded media for the good reason than an upload
pool will have all connections to the same host (the uploader upstream).
it also has a longer default retention period for connections.
2019-01-30 15:06:46 +01:00
Maxim Filippov 50d6183893 Split hide_network into hide_followers & hide_followings 2019-01-28 21:40:08 +03:00
William Pitcock 8e42251e06 rich media: add helpers module, use instead of MastodonAPI module 2019-01-28 06:04:54 +00:00
William Pitcock 24a103a1fe mastodon api: formatting 2019-01-28 05:53:17 +00:00
William Pitcock 132d815f1f mastodon api: factor out status card fetching, move status card rendering to statusview, add opengraph extended data 2019-01-28 05:53:17 +00:00
Haelwenn (lanodan) Monnier cda1470e02
[MastoAPI][GlitchAPI] Add bookmarks 2019-01-28 04:47:32 +01:00
kaniini 5eb81d2c72 Merge branch 'features/mastoapi-multi-hashtag' into 'develop'
MastodonAPI multi-hashtag

See merge request pleroma/pleroma!652
2019-01-27 12:45:50 +00:00
Haelwenn (lanodan) Monnier de956b9e04
Web.MastodonAPI.MastodonAPIController: tag+any bookmark params in a array and flatten it 2019-01-26 16:46:20 +01:00
William Pitcock 1f7843b9b8 mastodon api: use OGP uri instead of page_url for deducing domain name, fix test 2019-01-26 15:24:16 +00:00
William Pitcock 86037e9c39 mastodon api: use HTML.extract_first_external_url() 2019-01-26 15:13:27 +00:00
William Pitcock 78047d57bf mastodon api: provider_name setting is required too on the card 2019-01-26 14:47:32 +00:00
Haelwenn (lanodan) Monnier 39863236eb Web.MastodonAPI.MastodonAPIController: generic get_status_card/1 function for MastoAPI 2.6.x
Mastodon API 2.6.x added a card key to the Status object so the Card can be shown in the timeline without an extra request at each status.
2019-01-26 14:18:23 +00:00
Haelwenn (lanodan) Monnier 3f64379b13 Web.MastodonAPI.MastodonAPIController: Add Rich-Media support 2019-01-26 14:18:23 +00:00
Haelwenn (lanodan) Monnier 5a84def6a6
Fix the logic in multi-hashtag TLs 2019-01-26 04:46:02 +01:00
Haelwenn (lanodan) Monnier f9cae0d04f
[WIP,MastoAPI] Multi-tag timelines 2019-01-26 04:45:36 +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
lambda f3045a179e Merge branch 'i1t/pleroma-477_user_search_improvements' into 'develop'
I1t/pleroma 477 user search improvements

See merge request pleroma/pleroma!685
2019-01-20 10:24:05 +00:00
Mark Felder 8c368d42a2 Make attachment links configurable
Thanks @href!
2019-01-17 15:48:14 +00:00
Ivan Tashkinov dc45ec62c2 [#477] User search improvements: tsquery search with field weights, friends & followers boosting. 2019-01-14 20:04:45 +03:00
Sadposter 9daf162461 Honour parameters on MastoAPI /favourites 2019-01-12 14:42:52 +00:00
Sadposter 144b48da95 Add link headers to MastoAPI /favourites
As documented at https://docs.joinmastodon.org/api/rest/favourites/
2019-01-12 14:03:35 +00:00
Egor Kislitsyn f24087f96e Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/pinned-posts 2019-01-07 20:55:32 +07:00
Egor Kislitsyn 380e9fba21 add pinned posts 2019-01-07 20:45:33 +07:00
scarlett 36fa5e8802 Check visible_for_user when performing a search using a direct link. 2019-01-07 10:36:31 +00:00
kaniini 90e157ef80 Merge branch 'features/admin-api-user-views' into 'develop'
User/Account views: Add rights.admin

Closes #472

See merge request pleroma/pleroma!589
2018-12-31 15:49:34 +00:00
William Pitcock 980b5288ed update copyright years to 2019 2018-12-31 15:41:47 +00:00
Ivan Tashkinov 6e9a15b181 [#483] Blocked users export for TwitterAPI. 2018-12-28 21:08:07 +03:00
Haelwenn (lanodan) Monnier b43d630f30
Web.TwitterAPI.UserView: Add rights.admin 2018-12-28 17:38:32 +01:00
William Pitcock 2791ce9a1f add license boilerplate to pleroma core 2018-12-23 20:56:42 +00:00
Ivan Tashkinov 279096228c [#114] Made MastodonAPI and TwitterAPI user show actions return 404 for auth-inactive users
unless requested by admin or moderator.
2018-12-19 18:56:52 +03:00
href 5dcb7aecea
More put_view. 2018-12-16 17:51:22 +01:00
eal 28478a9c4f Merge branch 'fix/masto-put-settings' into 'develop'
Mastodon API: Fix PUT /api/web/settings

See merge request pleroma/pleroma!557
2018-12-16 11:21:26 +00:00
eal 4c783e35c0 Mastodon API: Fix PUT /api/web/settings 2018-12-16 13:15:34 +02:00
href 0b4c61e8d5
Fix warning 2018-12-14 13:56:42 +01:00
href ec0e613eca
Pleroma.Activity.mastodon_notification_type/1 2018-12-14 13:22:10 +01:00
href 331396cbcd
Properly disable Web Push if no VAPID key is set 2018-12-14 13:05:51 +01:00
Maksim Pechnikov 074fa790ba fix compile warnings 2018-12-09 20:50:08 +03:00
kaniini 1d531fd2f3 Merge branch 'fix/mastodon-api-settings' into 'develop'
Fix put_settings and remove info_changeset

See merge request pleroma/pleroma!507
2018-12-06 16:01:58 +00:00
kaniini abead01ab6 Merge branch 'correct-and-improve-http-options' into 'develop'
Correct and improve http options

See merge request pleroma/pleroma!505
2018-12-06 15:57:56 +00:00
rinpatch 2ae1128d9f MastoAPI: Fix put_settings 2018-12-06 17:42:07 +03:00
Egor Kislitsyn 79668c08fc cleanup 2018-12-06 20:50:20 +07:00
Egor Kislitsyn 4944498133 Merge branch 'develop' into feature/compat/push-subscriptions
# Conflicts:
#	lib/pleroma/application.ex
#	lib/pleroma/plugs/oauth_plug.ex
2018-12-06 20:15:16 +07:00
Egor Kislitsyn 8b4397c704 Merge branch 'develop' into feature/compat/push-subscriptions
# Conflicts:
#	lib/mix/tasks/sample_config.eex
#	lib/pleroma/web/twitter_api/controllers/util_controller.ex
#	mix.exs
#	mix.lock
2018-12-06 19:55:58 +07:00
Egor Kislitsyn 04a48286e6 Add web push support 2018-12-06 19:29:04 +07:00
kaniini ccf0b46dd6 Merge branch '210_twitter_api_uploads_alt_text' into 'develop'
[#210] TwitterAPI: alt text support for uploaded images. Mastodon API uploads security fix.

See merge request pleroma/pleroma!496
2018-12-06 07:36:21 +00:00
Ivan Tashkinov 3e90f688f1 [#210] Mastodon: actor storing for media uploads, ownership check to update_media.
Refactoring.
2018-12-06 10:26:17 +03:00
Hakaba Hitoyo 96ba95df2e remove follow_redirect options 2018-12-06 11:38:33 +09:00
Hakaba Hitoyo 505d820827 Merge remote-tracking branch 'origin/debug-suggestions-api' into correct-and-improve-http-options 2018-12-06 10:48:05 +09:00
lain 76d6b1c6ab Merge remote-tracking branch 'origin' into follower-hiding 2018-12-05 21:27:56 +01:00
lain 3ea4476445 MastodonAPI: Show users their own network. 2018-12-05 21:25:06 +01:00
hakabahitoyo a418547bdf debug /api/v1/suggestions 2018-12-05 16:08:34 +09:00
Maksim Pechnikov 87109482f3 status_code -> status 2018-12-04 14:04:06 +03:00
William Pitcock f85949cc69 object: factor out fetching functions into Pleroma.Object.Fetcher module 2018-12-04 04:52:09 +00:00
William Pitcock 5d4a71906a mastodon api: use Object.normalize() in a few missing spots 2018-12-04 04:52:09 +00:00
Maxim Filippov 4b70e5eae9 Parse bio for MastodonAPI 2018-12-03 18:59:50 +03:00
lain 2a639de9b3 MastodonApi: Implement hide_network. 2018-12-02 17:48:00 +01:00
lain 347df6421d Fix masto api user updating. 2018-12-01 10:40:01 +01:00