Commit graph

708 commits

Author SHA1 Message Date
Sergey Suprunenko
1690be991e Replace missing non-nullable Card attributes with empty strings 2019-05-30 21:03:31 +00:00
Mark Felder
e7edfd9fec Permit fetching statuses from API with nickname or id 2019-05-29 12:20:18 -05:00
Mark Felder
672fddb721 Default search limit should be 40
https://docs.joinmastodon.org/api/rest/search/
2019-05-29 08:06:26 -05:00
Sachin Joshi
1452a96ad6 ability to set and reset avatar, profile banner and backgroud in Mastodon API 2019-05-27 15:31:01 +05:45
William Pitcock
9bec891eb4 kill @httpoison 2019-05-25 04:24:21 +00:00
rinpatch
e6b175ed6c Fix credo issues 2019-05-22 21:57:46 +03:00
rinpatch
cdac5efd10 Merge branch 'bugfix/account_view_source.note' into 'develop'
MastoAPI AccountView: fill source.note with plaintext version of note

Closes #926

See merge request pleroma/pleroma!1189
2019-05-22 05:39:01 +00: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
rinpatch
63b0b7190c MastoAPI: Add GET /api/v1/polls/:id 2019-05-21 20:40:35 +03:00
rinpatch
0407ffe75f Change validation error status codes to be more appropriate 2019-05-21 17:12:38 +03:00
rinpatch
f28747858b Actual vote count in poll view 2019-05-21 14:27:09 +03:00
rinpatch
3f96b3e4b8 Enforce poll limits and add error handling for MastodonAPI's post endpoint 2019-05-21 10:54:20 +03:00
rinpatch
76a7429bef Add poll limits to /api/v1/instance and initial state 2019-05-21 09:13:10 +03:00
kaniini
d4847b17ca Merge branch 'refactor/add-virtual-thread-muted-field' into 'develop'
Add virtual :thread_muted? field

Closes #901

See merge request pleroma/pleroma!1178
2019-05-20 23:30:19 +00:00
Aaron Tinio
eb02edcad9 Add virtual :thread_muted? field
that may be set when fetching activities
2019-05-21 00:35:46 +08:00
Sadposter
daeae8e2e7
Move default mascot configuration to config/ 2019-05-20 16:12:55 +01:00
Sadposter
e81f0fc6d4
Add mascot get/set tests 2019-05-20 12:58:06 +01:00
Sadposter
54e9cb5c2d
Add API endpoints for a custom user mascot 2019-05-20 12:39:23 +01:00
rinpatch
1d90f9b969 Remove tags/mentions/rich text from poll options because Mastodon and
add custom emoji
2019-05-19 17:06:44 +03:00
rinpatch
5ece901af3 Resolve merge conflicts and remove IO.inspects 2019-05-18 13:37:38 +03:00
lain
412a3d8a0f Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into rum-index 2019-05-17 12:26:59 +02:00
lambda
1dcdcd8871 Merge branch 'bugfix/903-mastoapi-relationship-requested' into 'develop'
MastoAPI account_view.ex: requested is false when following is true

Closes #903

See merge request pleroma/pleroma!1169
2019-05-17 10:07:51 +00:00
lambda
46684db84d Update account_view.ex 2019-05-17 09:53:44 +00:00
rinpatch
642a67dd44 Render polls in statuses 2019-05-17 11:44:47 +03:00
Alexander Strizhakov
7ed682213f Fix/902 random compile failing 2019-05-17 07:25:20 +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
William Pitcock
de114ffbb0 activitypub: remove contain_timeline() 2019-05-15 15:53:06 +00:00
lain
cbb3451023 CommonAPI: Refactor visibility, forbid public to private replies. 2019-05-15 16:30:08 +02:00
lain
f1e67bdc31 Search: Add optional rum indexing / searching. 2019-05-15 15:28:01 +02:00
Mark Felder
bbacdf2352 Bump Mastodon API level 2019-05-13 15:52:16 -05:00
Alexander Strizhakov
a2be420f94 differences_in_mastoapi_responses.md: fullname & bio are optionnal
[ci skip]
2019-05-13 18:35:45 +00:00
Sachin Joshi
7701a4c841 Make irreversible field default to false in filters 2019-05-14 00:13:15 +05:45
lain
01c45ddc9e Search: Use RUM index. 2019-05-11 11:26:46 +02:00
Maksim
799e1f48b5 Refactoring functions for dealing with oauth scopes. 2019-05-08 10:52:13 +00:00
rinpatch
4c5125dedc Remove bookmarks assoc and add a fake bookmark assoc instead 2019-05-07 19:33:22 +00:00
rinpatch
3a7c14645e - Actually use preloaded bookmarks in views
- Preload bookmarks in bookmark timeline
- Rework bookmark preload tests
2019-05-07 19:33:22 +00:00
rinpatch
06947c9147 Remove bookmarks assoc 2019-05-07 19:33:22 +00:00
lambda
238dd72fad Merge branch 'conversations_three' into 'develop'
Conversations once more.

See merge request pleroma/pleroma!1119
2019-05-07 14:43:21 +00:00
rinpatch
d089ff2460 Merge branch 'fix/embeded-relationship-in-follows' into 'develop'
Fix embeded relationships in Mastodon API

See merge request pleroma/pleroma!1118
2019-05-03 20:36:13 +00:00
Haelwenn (lanodan) Monnier
b5ad1715b2
MastoAPI: profile update with emoji_map 2019-05-03 16:41:23 +02:00
Haelwenn (lanodan) Monnier
d70af32127
Pleroma.User: remove emojify on parse_bio 2019-05-03 16:27:50 +02:00
acb04306b6 Standardize construction of websocket URL
This follows up on the change made in d747bd98
2019-05-03 11:45:04 +00:00
lain
a0c755cc4a MastodonApi: Bump api level. 2019-05-03 13:40:43 +02:00
rinpatch
38b79461df Fix embeded relationships in Mastodon API
Currently some endpoints render accounts without for user resulting in
embedded relationship being empty. It causes bugs in followers/following
tab in pleroma-fe but I fixed it for other endpoints as well just in
case
2019-05-03 00:49:17 +03:00
lain
45f790becc Merge remote-tracking branch 'origin/develop' into conversations_three 2019-05-01 18:40:41 +02:00
Alex S
f11e7037c2 test fixes 2019-05-01 16:09:53 +07:00
Alex S
bdfa3a6fa8 Merging with develop
Conflicts:
lib/pleroma/web/activity_pub/transmogrifier.ex
lib/pleroma/user.ex
2019-05-01 12:29:33 +07:00
rinpatch
0fd176b990 Merge branch 'fix/add-default-scope-mastoapi' into 'develop'
Add default_scope to /api/v1/update_credentials

See merge request pleroma/pleroma!1100
2019-04-29 06:45:18 +00:00
rinpatch
ce3789e39a Add default_scope to /api/v1/update_credentials 2019-04-27 23:55:54 +03:00
rinpatch
c3e9fcf098 Fix bookmarks depending on embeded object and move checking if the
status is bookmarked to SQL
2019-04-27 23:06:46 +03:00
lambda
4de5fef1f8 Merge branch 'feature/807-bookmark-endpoint-extension' into 'develop'
Feature/807 bookmark endpoint extension

Closes #807

See merge request pleroma/pleroma!1059
2019-04-26 11:59:47 +00:00
rinpatch
dfc8425659 Move settings to Source subentity 2019-04-25 10:31:14 +03:00
Alex S
a825056d4d test fixes 2019-04-25 14:09:57 +07:00
Alex S
85953c0836 fixes for tests 2019-04-25 13:46:40 +07:00
Alex S
3c2ae80008 unused 2019-04-25 13:42:10 +07:00
Alex S
1258128f4f favourites add bookmark display 2019-04-25 13:38:24 +07:00
Alex S
73d01857e3 bookmarks in separate table 2019-04-25 13:38:24 +07: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
Sergey Suprunenko
9dd36e5bcb Extend Mastodon API with public endpoint for getting Favorites timeline of any user (#789) 2019-04-23 02:47:43 +00:00
kaniini
10c40e13d2 Merge branch 'mastoapi/add-in-reply-to-screen-name' into 'develop'
Add `in_reply_to_account_acct` to MastoAPI status entity

See merge request pleroma/pleroma!1086
2019-04-23 02:43:53 +00:00
rinpatch
f60d072bbb Add pleroma.in_reply_to_account_acct to MastoAPI status entity 2019-04-22 11:54:27 +03:00
rinpatch
d21d921def Replace Object.normalize(activity.data[object] with Object.normalize(acitivty) to benefit from preloading 2019-04-22 11:27:29 +03:00
Egor
b9cdf6d3b9 Use User.get_cached* everywhere 2019-04-22 07:20:43 +00:00
kaniini
7fcbda702e Merge branch 'rework-emoji-management' into 'develop'
Remove finmoji and add a way to download emojis in packs

Closes #817 and #821

See merge request pleroma/pleroma!1073
2019-04-22 02:07:19 +00:00
Roman Chvanikov
4908e0eeee Fix Credo warning 2019-04-21 23:24:33 +07:00
Roman Chvanikov
eeb093631c Fix Credo warning 2019-04-21 23:19:36 +07:00
Roman Chvanikov
e56afefef9 Refactor conversation function in MastodonAPIController to use a View 2019-04-21 23:14:27 +07:00
Roman Chvanikov
2662bea4e0 Add accounts and last_status to conversation read response 2019-04-21 20:26:13 +07:00
eugenijm
375fd21055 Set correct values in the MastoAPI reblog status view 2019-04-21 05:40:22 +03:00
Ekaterina Vaartis
52ed287e87 Fix incorrect multiple emoji tag handling introduced in initial impl 2019-04-20 11:17:17 +03:00
eugenijm
fa48532387 Handle reblogs on the first follow request in MastoAPI 2019-04-20 04:39:49 +03:00
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
lambda
56956de6fa Merge branch 'fix/status-reblogged' into 'develop'
Assign reblogged in the Mastodon reblog status view

Closes #812

See merge request pleroma/pleroma!1057
2019-04-15 10:26:23 +00: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
eugenijm
679a8ef629 Assign reblogged in the Mastodon reblog status view 2019-04-14 11:35:15 +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
Alexander Strizhakov
e03d24af96 in_reply_to_id - null 2019-04-12 02:21:32 +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
kaniini
97395e013e Merge branch 'notification-pleroma-settings' into 'develop'
Notification controls

Closes #738

See merge request pleroma/pleroma!988
2019-04-10 02:10:31 +00: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
rinpatch
f0f30019e1 Refactor html caching functions to have a key instead of a module, use more correct terminology and fix summaries in mastoapi 2019-04-05 15:19:44 +03: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
cd90695a34 Add PUT /api/pleroma/notification_settings endpoint 2019-03-28 18:55:16 +03: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
lambda
c6ab5ebe7c Merge branch 'features/mastoapi/2.7.2-instance-attributes' into 'develop'
Mastodon 2.7.2 instance attributes (registrations, languages)

See merge request pleroma/pleroma!979
2019-03-26 16:01:52 +00:00
Ivan Tashkinov
eef1042b16 Mastodon 2.7.2 instance attributes (registrations, languages). 2019-03-26 16:27:17 +03:00
eugenijm
568e348588 Increment replies_count on replies (MastoAPI) 2019-03-26 15:27:04 +03:00
rinpatch
a7f58b3c13 Serve non-public activities in /api/v1/favourites
Fixes #648
2019-03-25 02:15:45 +03:00
William Pitcock
3cc2554fa3 mastodon api: add conversation_id extension (ref #674) 2019-03-21 23:25:41 +00: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
da53c079db Refactor to store user ap_id, add tests 2019-03-15 14:20:08 +01:00
15b21d1983 refactor filtering mechanism 2019-03-15 14:18:53 +01:00
c8f31e0bc2 Implement mastodon's reblog hiding feature 2019-03-15 14:18:21 +01:00
Haelwenn
41fc67aa49 Merge branch 'mastoapi/mime_type' into 'develop'
Extend MastoAPI to provide attachment mimetypes

See merge request pleroma/pleroma!938
2019-03-15 09:48:50 +00:00
rinpatch
d7a34b604b Extend MastoAPI to provide attachment mimetypes 2019-03-15 11:58:12 +03: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
59333f2d56 Merge branch 'admin-api-account-view-namespace' into 'develop'
MastodonAPI.Admin.AccountView → AdminAPI.AccountView

See merge request pleroma/pleroma!930
2019-03-14 02:01:10 +00:00
kaniini
86871c8a04 Merge branch 'feature/add-local-to-users-admin-api' into 'develop'
Add "local" & "tags" to users admin API

See merge request pleroma/pleroma!932
2019-03-14 02:00:47 +00:00
Maxim Filippov
f3964f4024 Ensure empty array is returned for tags 2019-03-14 03:17:09 +03:00
Maxim Filippov
257d8e78e5 Add tags 2019-03-14 01:52:24 +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
Maxim Filippov
490d9cf7b1 Add "local" to users admin API 2019-03-13 16:04:44 +03:00
Haelwenn (lanodan) Monnier
cc0f2f8ba3
MastodonAPI.Admin.AccountView → AdminAPI.AccountView 2019-03-13 12:17:57 +01: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
Maxim Filippov
25eb6cf1cb Add "roles" to users admin API 2019-03-12 22:15:28 +03: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
lain
4811eefa6e MastoAPI StatusView: Add locality indicator. 2019-03-11 13:48:27 +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