Commit Graph

1074 Commits

Author SHA1 Message Date
Karen Konou c01ef574c1 Refactor as per Rin's suggestions, add endpoint tests 2019-02-11 12:04:02 +01:00
Egor Kislitsyn 305d219413 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/jobs
# Conflicts:
#	lib/pleroma/web/federator/federator.ex
#	lib/pleroma/web/websub/websub.ex
2019-02-11 13:54:21 +07:00
Haelwenn (lanodan) Monnier 74579115a7
test: Change `lenght(…) == 0` to `Enum.empty?(…)` 2019-02-11 03:44:16 +01:00
Haelwenn (lanodan) Monnier 8bb7e19b38
test: de-group alias/es 2019-02-11 03:44:15 +01:00
Karen Konou 6a150de3bd Add unique index and unique constraint check, uniqueness test fails 2019-02-09 20:52:11 +01:00
Karen Konou 478a05b4c9 Merged "check mute" test into the other two 2019-02-09 18:34:00 +01:00
Karen Konou a0d732ec55 it works!! 2019-02-09 17:47:57 +01:00
Karen Konou 4430a0ad12 added another test 2019-02-09 14:34:42 +01:00
Karen Konou 09189c3a7c Made a test! 2019-02-09 14:23:51 +01:00
rinpatch b05a341187 oof 2019-02-09 08:12:30 +03:00
rinpatch 9a23f8f3ea Add tests and fix a typo in docs 2019-02-08 20:23:26 +03: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
Haelwenn 1220a17146 Merge branch 'bugfix/rich-media-card' into 'develop'
rich media cards: bugfixes and regression tests

See merge request pleroma/pleroma!785
2019-02-06 18:39:13 +00:00
William Pitcock 26670b09a7 tests: add a rich media card that contains all relevant fields 2019-02-06 18:27:55 +00:00
William Pitcock 6eb8c1eb92 test: add some regression tests for the rich media card rendering 2019-02-06 18:12:26 +00:00
Egor Kislitsyn 5b1d7c3c56 fix tests 2019-02-06 12:17:41 +07:00
Egor Kislitsyn 6f05f448f8 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/jobs 2019-02-06 11:33:00 +07:00
eugenijm 035eaeb9b8 Allow to configure visibility for admin and moderator badges 2019-02-06 06:18:05 +03:00
eugenijm 398c81f9c8 Add is_admin and is_moderator boolean fields to the user view 2019-02-06 02:10:06 +03:00
William Pitcock 73e6a1f1dd test: twitterapi: fix another possible test failure case 2019-02-05 20:08:16 +00:00
kaniini eb2b1960e0 Merge branch 'feature/split-hide-network-v2' into 'develop'
Split hide_network into hide_followers & hide_followings (fixed)

See merge request pleroma/pleroma!765
2019-02-05 18:56:59 +00:00
William Pitcock c4d317ccb6 test: twitterapi: fix the test breakage for real 2019-02-05 18:49:02 +00:00
Egor Kislitsyn 3a3a3996b7 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/jobs
# Conflicts:
#	lib/pleroma/web/activity_pub/activity_pub.ex
#	lib/pleroma/web/federator/federator.ex
2019-02-04 20:50:28 +07:00
Maxim Filippov 16ce129e38 Split hide_network into hide_followers & hide_followings (fixed) 2019-02-03 21:55:04 +03:00
lambda 69a38644bc Merge branch '589-fix-cache' into 'develop'
Resolve "Update object cache on favs/boosts"

Closes #589

See merge request pleroma/pleroma!764
2019-02-03 18:19:40 +00:00
lain e61f0be951 Unbreak all the tests. 2019-02-03 18:54:39 +01:00
lain 505a084058 Still do caching in tests. 2019-02-03 18:28:14 +01:00
Ivan Tashkinov 3913b0196e [#582] Made single-pub task call Instance.set_reachable/1 if `set_reachable` is not specified.
Added tests.
2019-02-03 13:28:13 +03:00
Ivan Tashkinov b40b4bc4e5 [#582] Optimized federation retirement by reducing the number of SQL calls
(calling `Instances.set_reachable/1` only if instance had `unreachable_since`,
calling `Instances.set_unreachable/1` only if instance had nil `unreachable_since`).
2019-02-03 12:41:27 +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
href 7e384a2425 Merge branch 'develop' into 'develop'
Use nodeinfo 2.1

See merge request pleroma/pleroma!753
2019-02-01 19:18:46 +00:00
Luna e8c7be38fc add tests for nodeinfo 2.0 compat and 2.1's new field 2019-02-01 14:33:14 -03: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
href b3b0855456 Merge branch '534_federation_targets_reachability' into 'develop'
[#534] Unreachable federation targets retirement

Closes #534

See merge request pleroma/pleroma!703
2019-02-01 09:14:35 +00:00
Luna c05928dbda use nodeinfo 2.1, add repository field
that is the only change from nodeinfo 2.0 to 2.1

also this makes the nodeinfo tests use 2.1.json instead of 2.0.json
2019-02-01 03:55:10 -03:00
William Pitcock 3f5b784596 test: rich media: parser: add malformed data regression test 2019-01-31 16:19:53 +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
Egor Kislitsyn d3677d2b4d Merge remote-tracking branch 'MAIN/develop' into feature/jobs 2019-01-31 15:07:49 +07:00
lain c53b96a024 Fix specs. 2019-01-30 19:45:31 +01:00
kaniini d03a116654 Merge branch 'hj-happiness-improvement' into 'develop'
New frontend configuration mechanism.

Closes #445

See merge request pleroma/pleroma!700
2019-01-29 13:54:10 +00:00
Ivan Tashkinov 92753b0cd9 [#534] Made federation push sender be determined basing on content instead of `referer` header. Updated tests. 2019-01-29 13:12:28 +03:00
Haelwenn ebb3496386 Merge branch 'feature/rich-media-part-2-electric-boogaloo' into 'develop'
Rich Media support, part 2.

See merge request pleroma/pleroma!719
2019-01-29 05:11:08 +00:00
William Pitcock 61d6715714 rich media: oembed: return data in the same format as the other parsers 2019-01-28 21:13:25 +00:00
Maxim Filippov 3e968f9ef2 Format 2019-01-28 21:40:08 +03:00
Maxim Filippov 50d6183893 Split hide_network into hide_followers & hide_followings 2019-01-28 21:40:08 +03:00
Egor Kislitsyn 55affbca7f add a job queue 2019-01-28 22:17:17 +07:00
Ivan Tashkinov d3f9e6f6fe [#534] Merged `upstream/develop`. 2019-01-28 15:39:14 +03:00
Ivan Tashkinov 1d2f41642c [#534] Various tweaks. Tests for Instances and Instance. 2019-01-28 15:25:06 +03:00
lain 8e8a1e1ba8 Return new-style config if old-style config is set to false.
This is in preparation for 1.0. We'll be able to switch the config to the new
mechanism on PleromaFE then as well.
2019-01-28 13:07:12 +01:00
lain 1825118fd4 Correctly handle invalid credentials on auth login.
Closes #407
2019-01-28 11:41:47 +01:00
William Pitcock 339c26e12b test: add status posting with OGP link preview test 2019-01-28 06:19:00 +00:00
William Pitcock 6096846f5f API: kill /api/rich_media/parse endpoint 2019-01-28 05:53:17 +00:00
William Pitcock 020b3b29d9 test: update twitterapi tests 2019-01-28 05:53:17 +00:00
William Pitcock 364cf5369b test: update mastodon status view tests 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 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 1f7843b9b8 mastodon api: use OGP uri instead of page_url for deducing domain name, fix test 2019-01-26 15:24:16 +00:00
Haelwenn (lanodan) Monnier 3f64379b13 Web.MastodonAPI.MastodonAPIController: Add Rich-Media support 2019-01-26 14:18:23 +00:00
Haelwenn (lanodan) Monnier d9f3af477d Move definitions of RichMedia fixtures to test/support/http_request_mock.ex 2019-01-26 14:18:23 +00:00
Haelwenn (lanodan) Monnier 22f2687f17
Web.MastodonAPI.MastodonAPIControllerTest: Update for difference between all and any parameters 2019-01-26 04:46:02 +01:00
Haelwenn (lanodan) Monnier 5a84def6a6
Fix the logic in multi-hashtag TLs 2019-01-26 04:46:02 +01:00
Haelwenn (lanodan) Monnier 4ad0ad14ed
Web.ActivityPub.ActivityPub: Simplify multi-hashtag, add tests 2019-01-26 04:46:01 +01:00
Haelwenn (lanodan) Monnier d8f446f438
Web.MastodonAPI.MastodonAPIControllerTest: Add test against multi-hashtag timeline 2019-01-26 04:46:01 +01:00
Haelwenn (lanodan) Monnier 499a4591a4
Web.ActivityPub.ActivityPubTest: test against inserting activities with content: null 2019-01-26 04:23:52 +01:00
Ivan Tashkinov d99650270b [#534] Federation reachability filtering tests. 2019-01-25 20:38:54 +03:00
rinpatch a45a903480 Fix OGP provider tests 2019-01-25 10:51:06 +03:00
rinpatch 3a5b3c5a3a Merge remote-tracking branch 'pl/develop' into oembed_provider 2019-01-25 10:40:51 +03:00
kaniini 4c99b6d35a Merge branch 'fix/tusky-dm' into 'develop'
Add actor to recipients list

Closes #390

See merge request pleroma/pleroma!683
2019-01-25 05:19:32 +00:00
kaniini c9b418e547 Merge branch 'develop' into 'oembed_provider'
# Conflicts:
#   lib/pleroma/activity.ex
2019-01-25 05:00:47 +00:00
kaniini 4df71cd88b Merge branch 'classic-flakeids' into 'develop'
Flake Ids for Users and Activities

Closes #450

See merge request pleroma/pleroma!645
2019-01-25 04:59:06 +00:00
Maxim Filippov 9274cabe01 Use correct logic to determine "attentions" list 2019-01-24 23:30:43 +03:00
William Pitcock 13d72826df test: add anti-followbot policy tests 2019-01-24 09:50:40 +00:00
Maxim Filippov 4333fea1dc Send "hide_network" in user_view 2019-01-23 19:47:51 +03:00
lain 2de208817c Merge branch 'develop' into rename/pleroma_activity_consistency 2019-01-23 13:05:58 +01:00
lain e221c681dc New frontend configuration mechanism. 2019-01-23 12:40:57 +01:00
href 28d77e373c
Flake Ids for Users and Activities 2019-01-23 11:26:27 +01:00
Ivan Tashkinov 34d59e4008 [#502] Fixed User.active_local_user_query to return users with nil or missing `info.deactivated`. Adjusted test. 2019-01-22 17:12:53 +03:00
lain 762fafe738 Fix buggy test. 2019-01-21 17:54:11 +01:00
lambda 69454c8345 Merge branch 'feature/dm-sanity' into 'develop'
DM sanitization

See merge request pleroma/pleroma!458
2019-01-21 12:35:10 +00: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
Haelwenn (lanodan) Monnier f8ab1b7427
Activity: get_all_by_object_ap_id/1 → get_all_create_by_object_ap_id/1 2019-01-21 08:00:38 +01:00
Haelwenn (lanodan) Monnier b82c6dc536
Activity: all_by_object_ap_id/1 → get_all_by_object_ap_id/1 2019-01-21 07:49:59 +01:00
kaniini 5803672ae5 Merge branch '116-send-delete-event' into 'develop'
Send delete event over Mastodon streaming api

Closes #116

See merge request pleroma/pleroma!688
2019-01-20 23:06:21 +00:00
lain cf1f35a93a Send delete event over Mastodon streaming api
Closes #116
2019-01-20 13:00:46 +01:00
lambda 501fba33d6 Merge branch 'add-custom-emoji-test' into 'develop'
Add a test to ensure #39 is fixed.

See merge request pleroma/pleroma!687
2019-01-20 10:58:19 +00:00
lain be0fb5dec4 Add a test to ensure #39 is fixed. 2019-01-20 11:48:53 +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
William Pitcock cf3099231d test: transmogrifier: verify directMessage flag is sent outbound based on declared visibility 2019-01-20 02:28:28 +00:00
William Pitcock 21ac35fcc0 tests: add tests for DM sanitizer 2019-01-20 02:27:48 +00:00
William Pitcock 8d06be35e0 activitypub: utils: add determine_explicit_mentions() and tests 2019-01-20 02:27:48 +00:00
kaniini 42612b1c8d Merge branch 'bugfix/improve-boost-targeting' into 'develop'
improve handling of non-public Announces

See merge request pleroma/pleroma!681
2019-01-19 23:44:08 +00:00
Maxim Filippov 0a97badddd Format 2019-01-19 04:26:52 +03:00
Maxim Filippov 651a1d64b5 Add current user to mentioned 2019-01-19 04:25:15 +03:00
William Pitcock 31517bec12 test: add regression test for to/cc clobbering 2019-01-18 22:32:01 +00:00
Maxim Filippov e116e55cab Add actor to recipients 2019-01-18 22:40:52 +03:00
rinpatch 74346a7035 Fix merge conflict 2019-01-18 18:31:25 +03:00
rinpatch 7bc6208b2f Fix ostatus test 2019-01-18 10:35:52 +03:00
Ivan Tashkinov ed8f55ab8e [#477] User: FTS and trigram search results mixing (to handle misspelled requests). 2019-01-18 10:35:45 +03:00
rinpatch 1b1af4798a Use object instead of activity for metadata 2019-01-18 09:32:52 +03:00
rinpatch 64143d8040 Fix object id in OpenGraph test 2019-01-17 22:57:24 +03:00
Ivan Tashkinov 954dc4a4ad [#502] Fixed `user_count` in `/api/v1/instance` to include only active local users. 2019-01-17 19:16:02 +03:00
rinpatch 3b18789684 Fix test 2019-01-17 11:08:50 +03:00
rinpatch 293f6a8b71 join us now and share the software~. Also tests 2019-01-16 17:15:13 +03:00
lain 943324b661 MastoAPI: Don't break on missing users. 2019-01-16 15:13:09 +01:00
lambda 608cc65d43 Merge branch 'feature/improve-microformats' into 'develop'
improve microformats support

See merge request pleroma/pleroma!672
2019-01-16 09:06:47 +00:00
Ivan Tashkinov 90433b988e [#518] Fixed /api/v1/instance ("domain_count" value) and /api/v1/instance/peers responses. 2019-01-16 11:07:46 +03:00
rinpatch 8cea00e1dc Remove OpenGraph test from Ostatus tests 2019-01-16 10:53:57 +03:00
William Pitcock 85a5be6220 tests: fixup 2019-01-16 04:09:01 +00:00
Ivan Tashkinov fc965f982c [#477] Added FTS index for `users`. Fixed failing test. 2019-01-15 12:04:54 +03:00
kaniini de1da7b3d1 Merge branch 'feature/add-oembed-parser' into 'develop'
Add OEmbed parser

See merge request pleroma/pleroma!661
2019-01-14 07:28:04 +00:00
kaniini fa0392e49c Merge branch 'activitypub-likes' into 'develop'
Activitypub c2s likes

See merge request pleroma/pleroma!658
2019-01-14 07:27:05 +00:00
Sadposter 98d9ae0718 Add test for mastodon API /favourites endpoint 2019-01-13 15:17:47 +00:00
rinpatch e4dc3f71ae Resolve merge conflict 2019-01-13 13:38:28 +03:00
Maxim Filippov b8a77c5d70 Add OEmbed parser 2019-01-13 02:06:50 +02:00
sxsdv1 868034375c Add likes to activitypub object representation
Top level of the likes OrderedCollection is inlined to get immediate
access to totalItems. Because the count can be returned without scanning
the database for like activities the extra query is saved when the
client only wants to display the total.
2019-01-12 20:24:41 +01:00
sxsdv1 581edd5a91 Add route to get object like activities 2019-01-12 20:24:38 +01:00
sxsdv1 36711e1c83 Handle client submitted activitypub like activity 2019-01-12 20:24:35 +01:00
sxsdv1 1eb7318831 Prepare all types objects before serialising
Activities returned from inbox can include other types of objects like
Article
2019-01-12 20:24:32 +01:00
Egor Kislitsyn 728587fdaa typo 2019-01-11 12:47:44 +07:00
Egor Kislitsyn b594a54d0c unpin when deleting a status 2019-01-11 12:31:31 +07:00
kaniini e4afe1359b Merge branch 'activitypub-dereference-activity-id' into 'develop'
Support activity+json request for activity

See merge request pleroma/pleroma!641
2019-01-10 18:42:36 +00:00
Maxim Filippov 1f851a0723 Add Twitter Card parser 2019-01-10 18:09:56 +00:00
kaniini 11d08c6226 Merge branch 'twapi-follower-pagination' into 'develop'
Twapi follower pagination

See merge request pleroma/pleroma!648
2019-01-10 18:03:32 +00:00
Haelwenn ab4c5f5bf7 Merge branch 'bugfix/markdown-newline-codeblocks' into 'develop'
common api: fix newlines in markdown code blocks

See merge request pleroma/pleroma!651
2019-01-10 03:54:29 +00:00
William Pitcock 490c80bc96 test: common api: add tests for format_input/4 2019-01-10 03:46:34 +00:00
kaniini 7f5efddd6e Merge branch 'feature/pinned-posts' into 'develop'
Pinned Statuses

Closes #440

See merge request pleroma/pleroma!636
2019-01-10 02:39:53 +00:00
kaniini d203b0b4d3 Merge branch 'dm-optimizations' into 'develop'
Add activity visibility index.

See merge request pleroma/pleroma!646
2019-01-10 02:31:29 +00:00
lain a99e156f2c Add integer casts. 2019-01-09 18:17:23 +01:00
lain 7ac152ed38 TwitterAPI: Add follower/following pagination. 2019-01-09 18:14:32 +01:00
lambda 1881680e28 Merge branch 'scarlett/pleroma-summary-html-api' into 'develop'
Scarlett/pleroma summary html api

See merge request pleroma/pleroma!647
2019-01-09 16:26:38 +00:00
lain 8df348a3da Add test for summary_html 2019-01-09 17:18:37 +01:00
lain 5027f82cde Add activity visibility index. 2019-01-09 16:45:09 +01:00
Egor Kislitsyn 6cbe63726d improve tests 2019-01-09 19:54:37 +07:00
Egor Kislitsyn 44a1e69484 Add Twitter API for the pinned statuses
```
# Only return statuses that have been pinned
GET /api/statuses/user_timeline.json?pinned=true

# Pin
POST /api/statuses/pin/:id

# Unpin
POST /api/statuses/unpin/:id
```
2019-01-09 19:54:19 +07:00
Egor Kislitsyn 1b06e6fdf3 only non-reblogs, self-authored, public statuses can be pinned 2019-01-09 17:40:15 +07:00
sxsdv1 20c0dd1e24 Support activity+json request for activity 2019-01-09 09:33:30 +01:00
Egor Kislitsyn 0c750bc432 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/pinned-posts 2019-01-08 16:32:07 +07:00
Egor Kislitsyn 7b6c5f0a9d improve test readability 2019-01-08 16:01:35 +07:00
Egor Kislitsyn db6f4496eb fix test 2019-01-08 15:32:06 +07:00
Egor Kislitsyn e679da4c34 add `pinned` property to `StatusView` 2019-01-08 15:27:02 +07:00
Egor Kislitsyn 63dbd87568 rename `post` to `status` 2019-01-08 15:25:50 +07:00
lain a16b17cc61 Actually put some onformation in the error user, make it actually properly parse
in conversations.
2019-01-07 20:59:30 +01:00
kaniini 74e1093732 Merge branch 'resilient-user-view' into 'develop'
Make TwAPI UserView more resilient to issues.

See merge request pleroma/pleroma!634
2019-01-07 17:09:52 +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
lain 7dcafb4894 MastoAPI: Add test. 2019-01-07 13:13:37 +01:00
lain 7382adf407 Make TwAPI UserView more resilient to issues.
Will work for missing users and badly migrated users.
2019-01-07 12:41:31 +01:00
scarlett 52493467ac Twitter API: Add a summary_html field.
The intention here is to allow proper subject copying when it contains
emoji, obviously this will require minor frontend changes, though.
2019-01-06 10:19:00 +00:00