Tusooa Zhu
3afa1903ee
Do not stream out Create of ChatMessage
2022-08-27 17:51:41 -04:00
Alex Gleason
8833ea7a1b
Merge branch 'rebased-fixes' into 'develop'
...
Fix Rebased --> Pleroma instance version
See merge request soapbox-pub/rebased!167
2022-08-25 19:28:51 +00:00
Alex Gleason
d230d70170
Nodeinfo: fix Rebased --> Pleroma
2022-08-25 14:11:28 -05:00
Alex Gleason
a4c9739965
Fix Rebased --> Pleroma instance version
2022-08-25 14:02:38 -05:00
tusooa
84a573877a
Merge branch 'fix_erratic_tests' into 'develop'
...
Fix flaky rate_limiter_test.exs test "it restricts based on config values"
See merge request pleroma/pleroma!3688
2022-08-25 18:39:38 +00:00
tusooa
6811237ffd
Merge branch 'fix_flaky_transfer_task_test.exs' into 'develop'
...
Fix flaky/erratic test/pleroma/config/transfer_task_test.exs
See merge request pleroma/pleroma!3703
2022-08-25 18:38:18 +00:00
tusooa
6f10f93d62
Merge branch 'fix_erratic_participation_test' into 'develop'
...
fix flaky participation_test.exs
See merge request pleroma/pleroma!3689
2022-08-25 18:36:47 +00:00
Ilja
dc72a523c4
fix flaky participation_test.exs
2022-08-25 18:36:46 +00:00
64d515df28
Use colors from frontend configuration
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-08-25 14:58:28 +02:00
d967e1f55e
Add some controller tests, fixes
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-08-24 23:28:59 +02:00
tusooa
8ec985eea1
Merge branch 'fix_flaky_filter_controller_test.exs_200' into 'develop'
...
fix flaky test filter_controller_test.exs:200
See merge request pleroma/pleroma!3699
2022-08-24 15:24:57 +00:00
Ilja
5b2e3a303c
fix flaky test filter_controller_test.exs:200
2022-08-24 15:24:57 +00:00
tusooa
59109f8f74
Merge branch 'fix_flaky_test_user_relationship_test.exs_81' into 'develop'
...
fix flaky test_user_relationship_test.exs:81
See merge request pleroma/pleroma!3697
2022-08-24 15:24:07 +00:00
Ilja
47e3a72b6e
fix flaky test_user_relationship_test.exs:81
2022-08-24 15:24:07 +00:00
b8e44cb231
Notification test
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-08-21 23:23:19 +02:00
Tusooa Zhu
779457d9a4
Add GET endpoints for remote subscription forms
...
There are two reasons for adding a GET endpoint:
0: Barely displaying the form does not change anything on the server.
1: It makes frontend development easier as they can now use a link,
instead of a form, to allow remote users to interact with local ones.
2022-08-20 21:13:51 -04:00
Tusooa Zhu
2701628786
Add remote interaction ui for posts
2022-08-20 21:13:51 -04:00
Tusooa Zhu
06678fb4ad
Add function to calculate associated object id
2022-08-20 20:43:40 -04:00
Tusooa Zhu
5a2c8ef4cc
Refactor streamer test
2022-08-19 20:24:24 -04:00
Tusooa Zhu
f459c1260b
Lint
2022-08-19 20:24:24 -04:00
Tusooa Zhu
3522852c61
Test that server will disconnect websocket upon token revocation
2022-08-19 20:24:24 -04:00
Tusooa Zhu
eb42e90c4f
Use Websockex to replace websocket_client
2022-08-19 20:24:21 -04:00
Tusooa Zhu
c62a4f1c17
Disconnect streaming sessions when token is revoked
2022-08-19 20:22:45 -04:00
Hélène
4661b56720
ArticleNotePageValidator: fix replies fixing
...
Some software, like GoToSocial, expose replies as ActivityPub
Collections, but do not expose any item array directly in the object,
causing validation to fail via the ObjectID validator. Now, Pleroma will
drop that field in this situation too.
2022-08-19 02:45:49 +02:00
a0923b96a0
Fix voters_count in polls from remote Pleroma instances
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-08-18 23:39:07 +02:00
322e00e45a
Revert "Merge branch 'revert-f6e02270' into 'develop'"
...
This reverts commit 5b8ad6bc91
, reversing
changes made to f6e02270c3
.
2022-08-18 23:06:18 +02:00
marcin mikołajczak
4de58c2b2c
Revert "Merge branch 'polls' into 'develop'"
...
This reverts merge request !152
2022-08-18 06:38:03 +00:00
FloatingGhost
f41d970a59
fix resolution of GTS user keys
2022-08-16 18:51:34 +02:00
fa9106bb1b
Merge remote-tracking branch 'soapbox/develop' into polls
2022-08-16 07:42:22 +02:00
95f18a7296
Add tests
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Signed-off-by: marcin mikołajczak <me@mkljczk.pl>
2022-08-15 21:22:06 +02:00
Hélène
bb02ee99f5
CommonFixes: more predictable context generation
...
`context` fields for objects and activities can now be generated based
on the object/activity `inReplyTo` field or its ActivityPub ID, as a
fallback method in cases where `context` fields are missing for incoming
activities and objects.
2022-08-15 01:46:55 +02:00
Alex Gleason
dae909ad34
Revert "Merge branch 'from/upstream-develop/tusooa/sync-settings' into 'develop'"
...
This reverts commit 93f12c0d0d
, reversing
changes made to 6ce3f76b5d
.
2022-08-13 14:06:21 -05:00
Alex Gleason
f5713ab575
Tag erratic test
2022-08-13 14:04:21 -05:00
Alex Gleason
55c15ea81e
Merge remote-tracking branch 'pleroma/develop' into merge-pleroma
2022-08-13 13:42:11 -05:00
Haelwenn
06f9324afe
Merge branch 'from/upstream-develop/tusooa/2912-receiver-reject-mrf' into 'develop'
...
Treat MRF rejects as success in Oban worker
Closes #2912
See merge request pleroma/pleroma!3720
2022-08-12 01:37:40 +00:00
Haelwenn
93f12c0d0d
Merge branch 'from/upstream-develop/tusooa/sync-settings' into 'develop'
...
Synchronized settings for apps (frontends)
See merge request pleroma/pleroma!3698
2022-08-12 01:34:36 +00:00
Haelwenn
6ce3f76b5d
Merge branch 'from/upstream-develop/floatingghost/follow-state' into 'develop'
...
Backport: bugfix/follow-state
Closes #2902
See merge request pleroma/pleroma!3718
2022-08-12 01:32:20 +00:00
Alex Gleason
2edb44789d
Merge remote-tracking branch 'origin/develop' into odic
2022-08-11 18:17:44 -05:00
Alex Gleason
54838c959f
Expose oauth_consumer_strategies in instance API
2022-08-11 17:58:54 -05:00
Mark Felder
73b4d0d9a7
Fix the mocks to use uppercase as well
2022-08-10 21:46:56 +00:00
Hélène
3b6784b1de
CreateGenericValidator: fix reply context fixing
...
Incoming Pleroma replies to a Misskey thread were rejected due to a
broken context fix, which caused them to not be visible until a
non-Pleroma user interacted with the replies.
This fix properly sets the post-fix object context to its parent Create
activity as well, if it was changed.
2022-08-10 02:29:38 +02:00
Hélène
def0f5dc2e
StatusView: implement pleroma.context field
...
This field replaces the now deprecated conversation_id field, and now
exposes the ActivityPub object `context` directly via the MastoAPI
instead of relying on StatusNet-era data concepts.
2022-08-10 02:29:38 +02:00
Hélène
a9111bcaf2
StatusView: clear MSB on calculated conversation_id
...
This field seems to be a left-over from the StatusNet era.
If your application uses `pleroma.conversation_id`: this field is
deprecated.
It is currently stubbed instead by doing a CRC32 of the context, and
clearing the MSB to avoid overflow exceptions with signed integers on
the different clients using this field (Java/Kotlin code, mostly; see
Husky and probably other mobile clients.)
This should be removed in a future version of Pleroma. Pleroma-FE
currently depends on this field, as well.
2022-08-09 20:10:43 +02:00
Hélène
f3e061c964
Object: remove context_id field
...
30 to 70% of the objects in the object table are simple JSON objects
containing a single field, 'id', being the context's ID. The reason for
the creation of an object per context seems to be an old relic from the
StatusNet era, and has only been used nowadays as an helper for threads
in Pleroma-FE via the `pleroma.conversation_id` field in status views.
An object per context was created, and its numerical ID (table column)
was used and stored as 'context_id' in the object and activity along
with the full 'context' URI/string.
This commit removes this field and stops creation of objects for each
context, which will also allow incoming activities to use activity IDs
as contexts, something which was not possible before, or would have been
very broken under most circumstances.
The `pleroma.conversation_id` field has been reimplemented in a way to
maintain backwards-compatibility by calculating a CRC32 of the full
context URI/string in the object, instead of relying on the row ID for
the created context object.
2022-08-09 20:10:43 +02:00
538a210f70
Merge remote-tracking branch 'soapbox/develop' into pleroma-events
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-08-09 15:30:34 +02:00
8c8f648168
Merge remote-tracking branch 'soapbox/develop' into webfinger-expanding
2022-08-09 13:11:27 +02:00
Tusooa Zhu
a7f01ffc1d
Make backups require its own scope
2022-08-09 00:34:04 -04:00
0412cdcb32
Merge remote-tracking branch 'soapbox/develop' into edits
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-08-08 17:01:48 +02:00
Tusooa Zhu
d487e0160c
Treat containment failure as cancel in ReceiverWorker
2022-08-08 08:41:33 -04:00
b4575815ed
Add entry to @context, tests
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-08-08 10:45:43 +02:00
10753eeb6b
wip events
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-08-07 20:19:56 +02:00
a665aaaad2
Merge remote-tracking branch 'tusooa/from/upstream-develop/tusooa/edits' into edits
2022-08-06 14:41:12 +02:00
Tusooa Zhu
88e0e6acd5
Fix FederatorTest
2022-08-06 00:42:10 -04:00
Tusooa Zhu
a0166e92fa
Treat MRF rejects as success in Oban worker
2022-08-06 00:33:18 -04:00
55c62d19a8
Merge remote-tracking branch 'pleroma/develop' into merge-pleroma
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-08-03 23:42:48 +02:00
floatingghost
f2a9285ff0
bugfix/follow-state ( #104 )
...
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/104
2022-08-03 01:07:53 -04:00
Tusooa Zhu
a4fa286d20
Use actor_types() to determine whether the Update is for user
2022-08-02 10:37:28 -04:00
marcin mikołajczak
fdea5d2df6
Merge branch 'stream_markers' into 'develop'
...
Stream marker updates
See merge request soapbox-pub/soapbox-be!144
2022-08-02 07:35:37 +00:00
Haelwenn
b2ba307f4d
Merge branch 'from/upstream-develop/tusooa/2871-fix-local-public' into 'develop'
...
local only fixes
Closes #2871
See merge request pleroma/pleroma!3660
2022-08-02 05:39:50 +00:00
Haelwenn
7299795eb4
Merge branch 'from/upstream-develop/tusooa/backup-without-email' into 'develop'
...
Allow users to create backups without providing email address
See merge request pleroma/pleroma!3665
2022-08-02 05:23:49 +00:00
fe0c02f2c8
Stream marker updates
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-08-01 19:07:17 +02:00
Haelwenn
5ef2dc317d
Change test case wording
2022-07-31 21:34:23 +00:00
tusooa
c80096522c
Merge branch 'develop' into 'from/develop/tusooa/emit-move'
...
# Conflicts:
# CHANGELOG.md
# test/pleroma/user_test.exs
2022-07-31 21:32:49 +00:00
5d3d6a58f7
Use duration
param for mute expiration duration
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-31 17:22:34 +02:00
Haelwenn
0814d0e0cb
Merge branch 'fix/proper-emoji-qualification' into 'develop'
...
Emoji: implement full-qualifier using combinations
See merge request pleroma/pleroma!3709
2022-07-28 04:46:15 +00:00
Haelwenn
0f9f3d2897
Merge branch 'from/upstream-develop/tusooa/2384-pagination' into 'develop'
...
Make mutes and blocks behave the same as other lists
Closes #2384
See merge request pleroma/pleroma!3693
2022-07-28 04:37:10 +00:00
cca794e5fe
Merge remote-tracking branch 'soapbox/develop' into webhooks
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-26 19:12:52 +02:00
965f1de57e
Revert "Document way to do notice compatibility routes with Nginx reverse-proxy instead"
...
This reverts commit 64e16e6a4b
.
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-26 07:12:23 +02:00
234e09af3b
Merge remote-tracking branch 'tusooa/from/upstream-develop/tusooa/edits' into edits
2022-07-25 23:55:21 +02:00
a8540c3797
Merge Pleroma
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-25 23:51:14 +02:00
Hélène
fb3f6e1975
EmojiReactValidator: use new qualification method
2022-07-25 16:49:23 +02:00
Hélène
388bbc4978
EmojiReactValidator: fix emoji qualification
...
Tries fully-qualifying emoji when receiving them, by adding the emoji
variation sequence to the received reaction emoji.
This issue arises when other instance software, such as Misskey, tries
reacting with emoji that have unqualified or minimally qualified
variants, like a red heart. Pleroma only accepts fully qualified emoji
in emoji reactions, and refused those emoji. Now, Pleroma will attempt
to properly qualify them first, and reject them if checks still fail.
This commit contains changes to tests proposed by lanodan.
Co-authored-by: Haelwenn <contact+git.pleroma.social@hacktivis.me>
2022-07-24 13:36:06 +02:00
Tusooa Zhu
997f08b350
Make AntiLinkSpamPolicy history-aware
2022-07-24 00:18:09 -04:00
Tusooa Zhu
d877d2a4e7
Make HashtagPolicy history-aware
2022-07-24 00:02:39 -04:00
Tusooa Zhu
82c8fc1ede
Make NoEmptyPolicy work with Update
2022-07-23 23:24:25 -04:00
Tusooa Zhu
46a5c06853
Make NormalizeMarkup history-aware
2022-07-23 22:50:38 -04:00
Tusooa Zhu
fc7ce5f93c
Make NoPlaceholderTextPolicy history-aware
2022-07-23 22:41:04 -04:00
Tusooa Zhu
dce7e42928
Make MediaProxyWarmingPolicy history-aware
2022-07-23 22:34:03 -04:00
Tusooa Zhu
0a337063e1
Make ForceMentionsInContent history-aware
2022-07-23 22:23:57 -04:00
Tusooa Zhu
cd19537f39
Make EnsureRePrepended history-aware
2022-07-23 17:48:39 -04:00
Tusooa Zhu
eba9b0760f
Make MRF Keyword history-aware
2022-07-23 15:56:36 -04:00
tusooa
301ce5bc62
Merge branch 'mute-expiration' into 'develop'
...
MastoAPI: Show mutes expiration date
See merge request pleroma/pleroma!3682
2022-07-23 00:34:15 +00:00
Haelwenn
cfb21d011f
Revert "Merge branch 'fix/emoji-react-qualification' into 'develop'"
...
This reverts merge request !3684
2022-07-22 23:19:49 +00:00
FloatingGhost
09e0304b9c
Add test for broken owncast federation
2022-07-22 20:30:45 +02:00
tusooa
c589b8445f
Merge branch 'birthday_fix' into 'develop'
...
Allow to unset birthday
See merge request pleroma/pleroma!3702
2022-07-21 21:27:16 +00:00
Haelwenn
454f892f37
Merge branch 'fix/emoji-react-qualification' into 'develop'
...
EmojiReactValidator: fix emoji qualification
See merge request pleroma/pleroma!3684
2022-07-21 17:45:47 +00:00
Tusooa Zhu
4350a205a4
Merge remote-tracking branch 'upstream/develop' into HEAD
2022-07-21 13:44:16 -04:00
Haelwenn
1f18ab36b5
Merge branch 'resolve/notice-compatibility-routes-nginx' into 'develop'
...
Document way to do notice compatibility routes with Nginx reverse-proxy, fixes #2900
Closes #2900
See merge request pleroma/pleroma!3701
2022-07-20 16:57:05 +00:00
Ilja
ba31af021c
Fix flaky/erratic tests in Pleroma.Config.TransferTaskTest
...
There were async calls happening, so they weren't always finished when assert happened.
2022-07-20 13:26:26 +02:00
marcin mikołajczak
8c537f7b99
Merge branch 'quotes-count' into 'develop'
...
Count and display post quotes
See merge request soapbox-pub/soapbox-be!133
2022-07-19 20:02:15 +00:00
207d8f391f
Merge remote-tracking branch 'soapbox/develop' into webfinger-expanding
2022-07-18 18:34:40 +02:00
2f28aba5a4
Revert "StatusController: deleting a status returns the original media IDs"
...
This reverts commit a6598128ca
.
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-18 18:18:15 +02:00
8277995c82
Fix test
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-18 18:11:55 +02:00
f073443c79
Merge remote-tracking branch 'tusooa/from/upstream-develop/tusooa/edits' into edits
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-17 19:54:14 +02:00
fb268c4378
Allow to unset birthday
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-17 19:46:29 +02:00
Haelwenn
bb4860e222
Merge branch 'from/upstream-develop/tusooa/config-translatable' into 'develop'
...
Translatable config descriptions
Closes pleroma-meta#65
See merge request pleroma/pleroma!3695
2022-07-17 17:34:21 +00:00
abe13622e6
Merge remote-tracking branch 'pleroma/develop' into merge-pleroma
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-17 16:08:26 +02:00
Sean King
64e16e6a4b
Document way to do notice compatibility routes with Nginx reverse-proxy instead
2022-07-16 23:44:37 -06:00
tusooa
8aba7c08d1
Merge branch 'notification_types' into 'develop'
...
MastoAPI: Use `types` for filtering notifications
See merge request pleroma/pleroma!3648
2022-07-17 03:17:43 +00:00
597f56b4c4
Use :utc_datetime
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-16 16:28:22 +02:00
Tusooa Zhu
8371fd8ca2
Implement settings api
2022-07-16 01:20:25 -04:00
Tusooa Zhu
1d7e8d6e01
Pass in msgctxt for config translation strings
2022-07-14 17:41:33 -04:00
Ilja
c045a49909
Add privilege for announcements
2022-07-14 08:40:26 +02:00
Ilja
44d14e8a9c
Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into fine_grained_moderation_privileges
2022-07-14 07:07:19 +02:00
Tusooa Zhu
36f6d92d98
Add tests for translator compiler
2022-07-13 18:31:01 -04:00
9022d855cd
Check refute User.following?
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-13 22:57:42 +02:00
tusooa
fdc71f6051
Merge branch 'short-description' into 'develop'
...
Add short_description instance field
Closes #2865
See merge request pleroma/pleroma!3651
2022-07-13 04:42:24 +00:00
Tusooa Zhu
eb2a1652bf
Add tests for short_description
2022-07-13 00:40:46 -04:00
Tusooa Zhu
c1874bc8f9
Make mutes and blocks behave the same as other lists
2022-07-12 19:03:18 -04:00
tusooa
311fda32f3
Merge branch 'fix/case-sensitivity-restricted-nicknames-blacklisted-domains' into 'develop'
...
Make checking blacklisted domains and restricted nicknames case-insensitive
Closes #2894 and #2888
See merge request pleroma/pleroma!3687
2022-07-11 04:04:36 +00:00
Haelwenn
420da14b61
Merge branch 'from/upstream-develop/tusooa/2830-remote-fo-mp' into 'develop'
...
Pass remote follow avatar into media proxy
Closes #2830
See merge request pleroma/pleroma!3690
2022-07-10 16:19:16 +00:00
Sean King
3cf6c2b7ea
Use is_binary instead of is_bitstring for restricted nicknames tests
2022-07-09 23:39:35 -06:00
Tusooa Zhu
2efc0ffcf0
Pass remote follow avatar into media proxy
2022-07-10 00:12:53 -04:00
Tusooa Zhu
04ded94a50
Fix remote emoji in subject disappearing after edits
2022-07-09 18:00:42 -04:00
Ilja
26080b4b5c
Fix rate_limiter_test.exs test "it restricts based on config values"
...
It used a timer to sleep.
But time also goes on when doing other things, so depending on hardware, the timings could be off.
I slightly changed the tests so we still test what we functionally want.
Instead of waiting until the cache expires I now have a function to expire the test and use that.
That means we're not testing any more if the cache really expires after a certain amount of time,
but that's the responsability of the dependency imo, so shouldn't be a problem.
I also changed `Pleroma.Web.Endpoint, :http, :ip` to `127.0.0.1` because that's the setting people typically have,
and I see no reason to do it differently.
Especially since it's an exernal ip, which may come over as weird or suspicious to people.
2022-07-09 07:19:18 +02:00
0b16ce79f9
Add test for rendering mute expiration date
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-08 20:59:58 +02:00
Tusooa Zhu
11a6e88420
Test that Question updates are viable
2022-07-07 15:22:04 -04:00
Tusooa Zhu
069554e925
Guard against outdated Updates
...
It is possible for an earlier Update to be received by us later.
For this, we now
(1) only allows Updates to poll counts if there is no updated field,
or the updated field is the same as the last updated date or
creation date;
(2) does not allow updating anything if the updated field
is older than the last updated date or creation date;
(3) allows updating updatable fields otherwise (normal updates);
(4) if only the updated field is changed, it does not create
a new history item on its own.
2022-07-07 15:11:29 -04:00
Tusooa Zhu
f84ed44cea
Fix cannot get full history on object fetch
2022-07-06 01:19:53 -04:00
Sean King
0d4aceb9b0
Make checking blacklisted domains and restricted nicknames case-insenstive
2022-07-05 20:36:47 -06:00
Ilja
f88ed1df75
Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into fine_grained_moderation_privileges
2022-07-05 12:05:19 +02:00
Ilja
6ef38c6523
Improve tests after code review
2022-07-05 08:57:50 +02:00
Haelwenn
29f4ab640b
Merge branch 'from/upstream-develop/tusooa/report-too-long' into 'develop'
...
Fix long report notes giving errors on creation
See merge request pleroma/pleroma!3679
2022-07-04 05:21:20 +00:00
Haelwenn
8c78fef56f
EmojiReactValidator: apply lanodan's suggestions
...
These changes make the encoding for the fully-qualified heart emoji very visible in editors.
2022-07-04 00:25:54 +00:00
Tusooa Zhu
5ce118d970
Validate object data for incoming Update activities
...
In Create validator we do not validate the object data,
but that is because the object itself will go through the
pipeline again, which is not the case for Update. Thus,
we added validation for objects in Update activities.
2022-07-03 20:21:46 -04:00
Tusooa Zhu
4367489a3e
Pass history items through ObjectValidator for updatable object types
2022-07-03 20:02:52 -04:00
Tusooa Zhu
4edc867b87
Merge branch 'develop' into 'from/upstream-develop/tusooa/edits'
...
# Conflicts:
# lib/pleroma/constants.ex
2022-07-03 22:24:57 +00:00
Haelwenn
de37583c49
Merge branch 'image_description_from_exif_data' into 'develop'
...
Use EXIF data of image for image description
See merge request pleroma/pleroma!3535
2022-07-03 21:14:25 +00:00
Haelwenn
a15b45a589
Merge branch 'bugfix/mime-validation-no-list' into 'develop'
...
Bugfix: Validate mediaType only by it's format
See merge request pleroma/pleroma!3597
2022-07-03 21:04:41 +00:00
Haelwenn
6b937d1473
Merge branch 'from/upstream-develop/tusooa/server-announcements' into 'develop'
...
Server announcements (1st pass)
See merge request pleroma/pleroma!3643
2022-07-03 20:58:20 +00:00
b8a566229b
tests
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-07-03 20:21:05 +02:00
Ilja
42d4bd3a5d
Rename pipelines and add forgotten tags
...
I renamed some tags before, but forgot to rename the pipelines
I also had some tags which I forgot to add to the config, description, etc.
These have now been done/added
2022-07-02 08:55:14 +02:00
Ilja
c0e4b1b3e2
Fix typo's
...
priviledge |-> privilege
2022-07-02 07:52:39 +02:00
Ilja
56227ef7ba
Descriptions from exif data with only whitespeces are considered empty
...
I noticed that pictures taken with Ubuntu-Touch have whitespace in one of the fields
This should just be ignored imo
2022-07-01 13:47:23 +02:00
Ilja
4a9ed319b8
Change test pictures
...
The previous pictures were labeled as public domain, but are actually a collage of pictures under other licenses.
I now replaced them with a jpeg of simply a white pixel.
2022-07-01 12:15:02 +02:00
Ilja
81afaee374
Better way of getting keys
...
I used keyword_list[:key], but if the key doesn't exist, it will return nil. I actually expect a list and further down the code I use that list.
I believe the key should always be present, but in case it's not, it's better to return an empty list instead of nil. That way the code wont fail further down the line.
2022-07-01 12:15:02 +02:00
Ilja
d0d48a9e88
Add deprecation warnings
2022-07-01 12:15:02 +02:00
Ilja
8303af84ce
Rename the Exiftool module
...
No migrations or checks yet
2022-07-01 12:15:02 +02:00
Ilja
551721e41a
Rename the new module
2022-07-01 12:13:46 +02:00
Ilja
cd316d7269
Use EXIF data of image to prefill image description
...
During attachment upload Pleroma returns a "description" field. Pleroma-fe has an MR to use that to pre-fill the image description field, <https://git.pleroma.social/pleroma/pleroma-fe/-/merge_requests/1399 >
* This MR allows Pleroma to read the EXIF data during upload and return the description to the FE
* If a description is already present (e.g. because a previous module added it), it will use that
* Otherwise it will read from the EXIF data. First it will check -ImageDescription, if that's empty, it will check -iptc:Caption-Abstract
* If no description is found, it will simply return nil, just like before
* When people set up a new instance, they will be asked if they want to read metadata and this module will be activated if so
This was taken from an MR i did on Pleroma and isn't finished yet.
2022-07-01 12:13:46 +02:00
Ilja
37fdf148b0
Rename privilege tags
...
I first focussed on getting things working
Now that they do and we know what tags there are, I put some thought in providing better names
I use the form <what_it_controls>_<what_it_allows_you_to_do>
:statuses_read => :messages_read
:status_delete => :messages_delete
:user_read => :users_read
:user_deletion => :users_delete
:user_activation => :users_manage_activation_state
:user_invite => :users_manage_invites
:user_tag => :users_manage_tags
:user_credentials => :users_manage_credentials
:report_handle => :reports_manage_reports
:emoji_management => :emoji_manage_emoji
2022-07-01 10:28:09 +02:00
Hélène
11f9f2ef27
EmojiReactValidator: fix emoji qualification
...
Tries fully-qualifying emoji when receiving them, by adding the emoji
variation sequence to the received reaction emoji.
This issue arises when other instance software, such as Misskey, tries
reacting with emoji that have unqualified or minimally qualified
variants, like a red heart. Pleroma only accepts fully qualified emoji
in emoji reactions, and refused those emoji. Now, Pleroma will attempt
to properly qualify them first, and reject them if checks still fail.
2022-06-28 21:33:57 +02:00
409fd1d9a3
Allow to unset birthday
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-06-25 23:57:43 +02:00
4a57a65695
Mastodon-compatible webhooks
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-06-25 23:26:42 +02:00
Tusooa Zhu
014096aeef
Make outbound transmogrifier aware of edit history
2022-06-25 11:20:46 -04:00
Tusooa Zhu
5321fd0012
Do not put meta[:object_data] for local Updates
2022-06-25 10:03:19 -04:00
Tusooa Zhu
9c6dae942d
Fix local updates causing emojis to be lost
2022-06-25 09:23:09 -04:00
Tusooa Zhu
e98579b1da
Verify that formerRepresentation provided in Update is used
2022-06-25 01:17:09 -04:00
Tusooa Zhu
40953a8f5c
Reuse formerRepresentations from remote if possible
2022-06-25 01:03:46 -04:00
Tusooa Zhu
ee07383191
Use meta[:object_data] in SideEffects for Update
2022-06-24 10:28:58 -04:00
Tusooa Zhu
01321c88b5
Convert incoming Updated object into Pleroma format
2022-06-24 10:25:22 -04:00
Ilja
4e4eb81749
Add nodes and privileges to nodeinfo
...
I didn't add it to /api/v1/instance
I was wondering if I should, but since it e.g. also didn't show staff, it felt better not to
2022-06-21 12:10:27 +02:00
Ilja
211e561e2a
Show privileges to FE
...
I added an extra key
We already had is_admin and is_moderator, now we have an extra privileges key
2022-06-21 12:10:27 +02:00
Ilja
143ea7b80a
Add deactivated status for privileged users
...
Deactivated users are only visible to users privileged with :user_activation since fc317f3b17
Here we also make sure the users who are deactivated get the status deactivated for users who are allowed to see these users
2022-06-21 12:10:27 +02:00
Ilja
e21ef5aef3
report notifications for privileged users
...
Instead of `Pleroma.User.all_superusers()` we now use `Pleroma.User.all_superusers(:report_handle)`
I also changed it for sending emails, but there were no tests.
2022-06-21 12:10:27 +02:00
Ilja
34adea8d28
Add Pleroma.User.all_users_with_privilege/1
...
This should eventually replace the Pleroma.User.all_superusers/0 function
* I added a new param `is_privileged` in User.query
* Now we can fetch all users with a specified privilege
2022-06-21 12:10:27 +02:00
Ilja
a1c8aa4721
Remove function superuser?
...
Everything now happens with privileged?/2
2022-06-21 12:10:27 +02:00
Ilja
eab13fed3e
Hide pleroma:report for non-privileged users
...
Before we deleted the notifications, but that was a side effect and didn't always trigger any more.
Now we just hide them when an unprivileged user asks them.
2022-06-21 12:10:27 +02:00
Ilja
e45faddb38
Revert "Delete report notifs when demoting from superuser"
...
This reverts commit 89667189b8
and cdc5bbe836
.
This is a side effect when changing user role.
The goal was to not have report notifications when someone isn't admin or moderator any more.
But this won't be triggered when we change the privilege tags for a role, so we can't use this sollution any more.
There was another solution to filter out report notifications during fetch.
It wasn't merged because this seemed 'cleaner' at the time, but now it seems the better sollution.
I'll add it in the next commit.
2022-06-21 12:10:27 +02:00
Ilja
edf0013ff3
User.visible_for/2
...
According to the tests, this was only used for unconfirmed accounts.
So this just needed to be restricted to users with privilege :user_activation
2022-06-21 12:10:27 +02:00
Ilja
bb61cfee8d
Validator for deleting statusses is now done with priviledge instead of superuser
2022-06-21 12:10:27 +02:00
Ilja
7cf473c500
delete statusses is now privileged by :status_delete
...
Instead of superusers, you now need a role with privilige :status_delete to delete other users statusses
I also cleaned up some other stuff I saw
2022-06-21 12:10:27 +02:00
Ilja
7adfc2e0f4
Add Pleroma.User.privileged?/2
...
This should eventually replace Pleroma.User.superuser?/1
2022-06-21 12:10:27 +02:00
Ilja
9da81f41c6
Fix warning during test user_test.exs
...
Fixed the warning
[warning] Please change `clear_config([section], key: value)` to `clear_config([section, key], value)`
2022-06-21 12:10:27 +02:00
Ilja
c842e62675
Add last priviliges
...
I still had three endpoints I didn't really know what to do with them. I added them under separate tags
* :instance_delete
* :moderation_log_read
* :stats_read
I also checked and these are the last changes done by MR https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3480/diffs this is trying to fix
2022-06-21 12:10:27 +02:00
Ilja
ecd42a2ce1
Add privilige :emoji_management
2022-06-21 12:10:27 +02:00
Ilja
0ee8f33250
Add privilige :status_delete
...
It also allows to update a message, so it's not just deleting. I need a better name...
2022-06-21 12:10:27 +02:00
Ilja
34a98990db
last off :statuses_read
...
From the endpoints left to do, I believe these should be under :statuses_read.
These should be the last for that privilege for this MR
2022-06-21 12:10:27 +02:00
Ilja
4cb0dbb5dc
Mark relevant tests synchronous
...
One of the things we do during the tests is change the config. But that's global state and different tests were interfering.
E.g. one test would set `clear_config([:instance, :admin_privileges], [:statuses_read])`, but while that runs, another test may
do `clear_config([:instance, :admin_privileges], [:user_invite])`. Now the code for the first test checks the setting, and it
finds `:user_invite` instead of `:statuses_read`.
Now the modules where this happens are marked to run synchronously, so they don't interfere with each other.
2022-06-21 12:10:27 +02:00
Ilja
cbb26262a5
Add privileges for :user_read
2022-06-21 12:10:27 +02:00
Ilja
3f26f1b30f
Add privileges for :report_handle
2022-06-21 12:10:27 +02:00
Ilja
14e697a64f
Add privileges for :user_invite
2022-06-21 12:10:27 +02:00
Ilja
e102d25d23
Add privileges for :user_activation
2022-06-21 12:10:27 +02:00
Ilja
cb60cc4e02
Add privileges for :user_tag
2022-06-21 12:10:27 +02:00
Ilja
5a65e2dac5
Remove privileged_staff
...
Everything that was done through this setting, can now be set by giving the proper privileges to the roles.
2022-06-21 12:10:27 +02:00
Ilja
b1ff5241c2
Add priviledges for :statuses_read
...
This was the last in :require_privileged_staff. I'll remove that in the next commit
2022-06-21 12:10:27 +02:00
Ilja
8a9144ca8b
Add priviledges for :user_credentials
...
I only moved the ones from the :require_privileged_staff block for now
2022-06-21 12:10:27 +02:00
Ilja
9f6c364759
Add privilege :user_deletion
2022-06-21 12:10:27 +02:00
Ilja
5b19543f0a
Add new setting and Plug to allow for privilege settings for staff
2022-06-21 12:10:26 +02:00
Tusooa Zhu
44613db853
Show original status at the first of history
2022-06-11 19:52:07 -04:00
Tusooa Zhu
7451f0e81f
Send the correct update in streamer
...
get_create_by_ap_id_with_object() seems to fetch the old object.
Why this happens needs further investigation.
2022-06-11 12:02:16 -04:00
Tusooa Zhu
27f3d802f2
Expose history and source apis to anon users
2022-06-11 10:35:36 -04:00
Tusooa Zhu
c3593639ad
Fix incorrectly cached content after editing
2022-06-09 11:39:51 -04:00
Tusooa Zhu
aafd7a687d
Return the corresponding object id in attachment view
2022-06-08 11:45:24 -04:00
Tusooa Zhu
237b220d71
Add object id to uploaded attachments
2022-06-08 11:05:48 -04:00
Tusooa Zhu
532f6ae3ed
Return update notification in mastodon api
2022-06-05 16:34:42 -04:00
Tusooa Zhu
06a3998013
Create Update notifications
2022-06-05 15:02:25 -04:00
Tusooa Zhu
97eabb2047
Fix CommonAPITest
2022-06-04 13:15:07 -04:00
Tusooa Zhu
fe2d4778ee
Expose content type of status sources
2022-06-04 12:57:30 -04:00
Tusooa Zhu
72ac940618
Fix SideEffectsTest
2022-06-03 21:50:49 -04:00
Tusooa Zhu
3249ac1f12
Show edited_at in MastodonAPI/show
2022-06-03 21:47:40 -04:00
Tusooa Zhu
fdaa864083
Test that own edits are streamed
2022-06-03 21:17:16 -04:00
Tusooa Zhu
8bac8147d4
Stream out edits
2022-06-03 21:15:17 -04:00
Tusooa Zhu
b096fbba1a
Fix long report notes giving errors on creation
2022-06-02 01:28:39 -04:00
Tusooa Zhu
fa31ae50e6
Inject history when object is refetched
2022-06-01 19:49:04 -04:00
Tusooa Zhu
410e177b2a
Strip internal fields in formerRepresentation
2022-06-01 12:02:03 -04:00
Tusooa Zhu
b613a9ec6b
Implement mastodon api for editing status
2022-05-31 14:32:28 -04:00
Pierre-Louis Bonicoli
6f23fc8e08
Add tlsv1.3 to suggestions
2022-05-31 00:51:48 +02:00
Tusooa Zhu
393b508846
Implement viewing source
2022-05-30 00:59:23 -04:00
Tusooa Zhu
c004eb0fa2
Implement mastodon api for showing edit history
2022-05-29 23:50:31 -04:00
Tusooa Zhu
8acfe95f3e
Allow updating polls
2022-05-29 22:16:03 -04:00
Tusooa Zhu
5e8aac0e07
Record edit history for Note and Question Updates
2022-05-29 13:54:16 -04:00
Tusooa Zhu
0f6a5eb9a2
Handle Note and Question Updates
2022-05-29 12:54:57 -04:00
Tusooa Zhu
547def67a7
Allow Updates by every actor on the same origin
2022-05-29 11:36:00 -04:00
0fbe33b4aa
Add tests
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-05-27 15:45:42 +02:00
a3ea2bdbc2
Merge remote-tracking branch 'soapbox/develop' into webfinger-expanding
2022-05-20 11:44:49 +02:00
Hélène
a74ce2d77a
StealEmojiPolicy: fix String rejected_shortcodes
...
* rejected_shortcodes is defined as a list of strings in the
configuration description. As such, database-based configuration was
led to handle those settings as strings, and not as the actually
expected type, Regex.
* This caused each message passing through this MRF, if a rejected
shortcode was set and the emoji did not exist already on the instance,
to fail federating, as an exception was raised, swiftly caught and
mostly silenced.
* This commit fixes the issue by introducing new behavior: strings are
now handled as perfect matches for an emoji shortcode (meaning that if
the emoji-to-be-pulled's shortcode is in the blacklist, it will be
rejected), while still supporting Regex types as before.
2022-05-18 21:25:10 +02:00
Alex Gleason
e13f64bd8e
Merge remote-tracking branch 'pleroma/develop' into merge-upstream
2022-05-17 11:19:29 -05:00
Tusooa Zhu
6e5ef7f2eb
Test local-only in ap c2s outbox
...
Ref: fix-local-public
2022-05-09 18:53:32 -04:00
Tusooa Zhu
38444aa92a
Allow authenticated users to access local-only posts in MastoAPI
...
Ref: fix-local-public
2022-05-09 18:53:18 -04:00
Haelwenn
4605efe272
Merge branch 'improve_anti_followbot_policy' into 'develop'
...
Also use actor_type to determine if an account is a bot in antiFollowbotPolicy
Closes #2561
See merge request pleroma/pleroma!3498
2022-05-08 18:10:40 +00:00
Ilja
a8093732bd
Also use actor_type to determine if an account is a bot in antiFollowbotPolicy
2022-05-08 18:10:40 +00:00
Tusooa Zhu
221cb3fb81
Allow users to create backups without providing email address
...
Ref: backup-without-email
2022-05-07 00:23:55 -04:00
Tusooa Zhu
fe933b9bf2
Prevent remote access of local-only posts via /objects
...
Ref: fix-local-public
2022-05-06 13:54:21 -04:00
Tusooa Zhu
466568ae36
Lint
...
Ref: fix-local-public
2022-05-06 13:54:13 -04:00
Tusooa Zhu
826deb7375
Make local-only statuses searchable
...
Ref: fix-local-public
2022-05-06 13:54:13 -04:00
Tusooa Zhu
38af42968d
Test that anonymous users cannot see local-only posts
...
Ref: fix-local-public
2022-05-06 13:54:12 -04:00
Tusooa Zhu
c48be59f58
Show local-only statuses in public timeline for authenticated users
...
Ref: fix-local-public
2022-05-06 13:54:02 -04:00
Tusooa Zhu
57c030a0a7
Skip cache when /objects or /activities is authenticated
...
Ref: fix-local-public
2022-05-06 10:23:26 +02:00
Tusooa Zhu
e2d24eda57
Allow to skip cache in Cache plug
...
Ref: fix-local-public
2022-05-06 10:23:26 +02:00
Tusooa Zhu
fa3157df96
Skip cache when /objects or /activities is authenticated
...
Ref: fix-local-public
2022-05-06 08:44:03 +02:00
Tusooa Zhu
4d482b765f
Allow to skip cache in Cache plug
...
Ref: fix-local-public
2022-05-06 08:39:42 +02:00
cfb9efd47c
Merge remote-tracking branch 'soapbox/develop' into webfinger-expanding
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-05-01 21:55:19 +02:00
Tusooa Zhu
be08d9305b
Fix incorrect fallback when English is set to first language
2022-04-17 22:39:52 -04:00
a0eb48b785
Merge remote-tracking branch 'soapbox/develop' into status-notification-type
2022-04-14 20:15:21 +02:00
Ilja
5f37db330f
Fix eratic test for POST /api/pleroma/admin/reports/:id/notes
...
It retrieved two ReportNotes and then checked one of them. But the order isn't guaranteed, while the test tested on the content of the first ReportNote.
I made the test on the content more generic
2022-04-05 13:21:09 +02:00
Tusooa Zhu
7d1dae3bef
Restrict mastodon api announcements to logged-in users only
2022-04-02 02:25:13 -04:00
Alex Gleason
fc25b626da
Merge branch 'merge-upstream' into 'develop'
...
Merge upstream
See merge request soapbox-pub/soapbox-be!108
2022-03-23 20:37:40 +00:00
7bc95acca0
Add "status" notification type
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-22 20:29:28 +01:00
Sean King
4194559ea6
Fix lint errors
2022-03-20 17:26:07 -06:00
Haelwenn
d7c53da77a
Merge branch 'from/upstream-develop/tusooa/translate-pages' into 'develop'
...
Translate backend-rendered pages
See merge request pleroma/pleroma!3634
2022-03-20 18:14:37 +00:00
Haelwenn
b76340511d
Merge branch 'delete_report_notifs_when_demoting_from_superuser' into 'develop'
...
Delete report notifs when demoting from superuser
Closes #2840
See merge request pleroma/pleroma!3642
2022-03-20 18:13:19 +00:00
Sean King
d0c1997d48
Rewrite integration-test websocket client with Mint.WebSocket
2022-03-19 23:33:37 -06:00
Tusooa Zhu
0c78ab4a88
Use utc_datetime in db schema
2022-03-18 11:17:22 -04:00
Haelwenn (lanodan) Monnier
030183b35f
AttachmentValidator: Use custom ecto type and regex for "mediaType"
2022-03-17 22:37:26 +01:00
Alex Gleason
d7cbaedc86
Merge branch 'fix-attachments' into 'develop'
...
StatusController: deleting a status returns the original media IDs
See merge request soapbox-pub/soapbox-be!114
2022-03-17 18:58:19 +00:00
Alex Gleason
552525e954
Merge branch 'notification-types' into 'develop'
...
MastoAPI: Use `types` for filtering notifications
See merge request soapbox-pub/soapbox-be!113
2022-03-17 18:57:49 +00:00
Alex Gleason
a6598128ca
StatusController: deleting a status returns the original media IDs
2022-03-16 18:13:35 -05:00
f572a416e7
Use types
for filtering notifications
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-16 21:16:03 +01:00
31ff467eff
Use types
for filtering notifications
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-16 21:15:44 +01:00
ffe081bf44
Use reject_follow_request
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-16 19:18:15 +01:00
eb35a54ab8
Use reject_follow_request
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-16 19:15:58 +01:00
6754d1f272
POST /api/v1/accounts/:id/remove_from_followers
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-16 16:52:33 +01:00
8157013f0b
POST /api/v1/accounts/:id/remove_from_followers
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-16 16:52:09 +01:00
4c56e0fceb
Support account location field
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-14 22:41:33 +01:00
212080c3e8
Store status content mime type in the object
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-13 20:20:39 +01:00
Alex Gleason
b56b0fb4e9
Merge remote-tracking branch 'pleroma/develop' into merge-upstream
2022-03-09 16:34:57 -06:00
Tusooa Zhu
ebcda5265b
Format announcements into html
2022-03-08 23:00:51 -05:00
Tusooa Zhu
eb1a29640f
Add pagination to AdminAPI.AnnouncementController.index
2022-03-08 21:26:05 -05:00
Tusooa Zhu
11a1996bf5
Implement update announcement admin api
2022-03-08 20:55:41 -05:00
Tusooa Zhu
881179ec72
Remove GET /api/v1/announcements/:id
2022-03-08 19:22:28 -05:00
Tusooa Zhu
d569694ae9
Show only visible announcements in MastodonAPI
2022-03-08 19:20:29 -05:00
Tusooa Zhu
cf8334dbc1
Add starts_at, ends_at and all_day parameters
2022-03-08 19:12:01 -05:00
Tusooa Zhu
fcf3c9057e
Implement visibility filtering for announcements
2022-03-08 18:21:20 -05:00
Tusooa Zhu
2b39b36e49
Implement POST /api/v1/announcements/:id/dismiss
2022-03-08 16:59:20 -05:00
Tusooa Zhu
aa1fff279e
Implement GET /api/v1/announcements/:id
2022-03-08 16:19:35 -05:00
Tusooa Zhu
5169ad8f14
Implement announcement read relationships
2022-03-08 13:09:49 -05:00
Tusooa Zhu
d7af67012f
Implement first pass of announcement admin api
...
CCBUG: https://git.pleroma.social/pleroma/pleroma/-/issues/2836
CCBUG: https://git.pleroma.social/pleroma/pleroma/-/issues/1470
2022-03-08 01:01:27 -05:00
Haelwenn
4458db3201
Merge branch 'fix_test_get_user_apps' into 'develop'
...
Fix test get_user_apps/1
See merge request pleroma/pleroma!3636
2022-03-06 18:40:49 +00:00
Tusooa Zhu
79ccb6b999
Support fallbacking to other languages
2022-03-06 11:43:31 -05:00
Ilja
89667189b8
Delete report notifs when demoting from superuser
...
When someone isn't a superuser any more, they shouldn't see the reporsts any more either.
Here we delete the report notifications from a user when that user gets updated from being a superuser to a non-superuser.
2022-03-06 17:36:30 +01:00
Tusooa Zhu
cd42e2bed0
Lint
2022-03-03 09:49:55 -05:00
Tusooa Zhu
aca11fb70e
Support multiple locales from userLanguage cookie
2022-03-03 02:31:36 -05:00
Tusooa Zhu
7ea330b4fe
Support multiple locales formally
...
elixir gettext current does not fully support fallback to another language [0].
But it might in the future. We adapt it so that all languages in Accept-Language
headers are received by Pleroma.Web.Gettext. User.languages is now a comma-separated
list.
[0]: https://github.com/elixir-gettext/gettext/issues/303
2022-03-03 02:03:44 -05:00
Tusooa Zhu
bc59da96c5
Add test for fallbacking to a general language
2022-03-02 20:04:30 -05:00
Tusooa Zhu
8de573b047
Fallback to a variant if the language in general is not supported
...
For an example, here, zh is not supported, but zh_Hans and zh_Hant
are. If the user asks for zh, we should choose a variant for them
instead of fallbacking to default.
Some browsers (e.g. Firefox) does not allow users to customize
their language codes. For example, there is no zh-Hans, but only
zh, zh-CN, zh-TW, zh-HK, etc. This provides a workaround for
those users suffering from bad design decisions.
2022-03-02 19:59:11 -05:00
dcdb6a9f97
Merge remote-tracking branch 'soapbox/develop' into report-assign-account
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-02 16:34:13 +01:00
266ed48d93
add tests
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-02 15:25:00 +01:00
Tusooa Zhu
e644f8dea5
Allow user to register with custom language
2022-03-02 01:41:13 -05:00
Tusooa Zhu
0149ea4538
Send emails i18n'd using backend-stored user language
2022-03-01 22:19:13 -05:00
Tusooa Zhu
8b0c2890f9
Fix digest test
2022-03-01 20:27:45 -05:00
Alex Gleason
c34b232d80
Merge branch 'report-rules' into 'develop'
...
Allow submitting an array of rule_ids to /api/v1/reports
See merge request soapbox-pub/soapbox-be!101
2022-03-01 23:04:24 +00:00
4ab4903186
Add tests
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-03-01 23:50:09 +01:00
Alex Gleason
1db95a1677
SideEffects: don't stream Create/ChatMessage in an 'update' event
2022-02-28 14:56:20 -06:00
HJ
ee05abe052
Merge branch 'revert/notice-routes' into 'develop'
...
Revert notice compatibility routes merge request
See merge request pleroma/pleroma!3576
2022-02-26 16:24:49 +00:00
Sean King
17aa3644be
Copyright bump for 2022
2022-02-25 23:11:42 -07:00
Alex Gleason
4bdd365b6f
Merge branch 'merge-upstream' into 'develop'
...
Add unicode 14 support
See merge request soapbox-pub/soapbox-be!102
2022-02-24 17:42:46 +00:00
Alex Gleason
16745b8e91
Merge remote-tracking branch 'pleroma/develop' into merge-upstream
2022-02-24 12:28:23 -05:00
Ilja
6ba93c2cb3
Fix test get_user_apps/1
...
For some reason I had a test who suddenly failed, mix test test/pleroma/web/o_auth/app_test.exs:54. A user has a list of applications and this test adds them and then sees if the list it gets back is the same as the apps it added.
When I ran mix test a day before I didn't have this problem and when I pushed code today in a different MR, the pipeline succeeded (see https://git.pleroma.social/ilja/pleroma/-/jobs/205827 ), yet locally it failed. So it seems the test can sometimes succeed and sometimes fail, which makes it untrustworthy.
The failure I see is because the returned list is in reverse order. I assume that's not per sé wrong. You just want to know if the apps you added are actually there. I fixed the test by first ordering the lists before comparing.
AFAICT (and as far as that's relevant) the test got introduced in commit cb2a072e62
2022-02-22 18:56:26 +01:00
Tusooa Zhu
0fd3695b9c
Prefer userLanguage cookie over Accept-Language header in detecting locale
...
https://git.pleroma.social/pleroma/pleroma-meta/-/issues/60
2022-02-21 18:02:19 -05:00
Sam Therapy
061cb749cd
Add unicode 14 support
...
and add a test with a unicode 14 emoji
2022-02-21 12:28:33 -06:00
644b7e614e
Allow submitting an array of rule_ids to /api/v1/reports
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-21 13:37:13 +01:00
9747233375
Add mastodon admin API routes for report assigning
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-18 18:06:24 +01:00
db77571319
Merge remote-tracking branch 'soapbox/develop' into report-assign-account
2022-02-18 17:25:52 +01:00
05fb8229b9
Allow assigning users to reports
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-18 17:23:57 +01:00
e4677e212c
Merge remote-tracking branch 'soapbox/develop' into mastodon-admin-api
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-17 15:28:25 +01:00
Alex Gleason
0a6c52fecb
Merge branch 'configuration' into 'develop'
...
Add `configuration` field to /api/v1/instance
See merge request soapbox-pub/soapbox-be!98
2022-02-16 20:24:48 +00:00
892f75e9d7
InstanceControllerTest: Add configuration test
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-16 20:41:36 +01:00
fbb159dd47
Merge remote-tracking branch 'tusooa/from/develop/tusooa/emit-move' into emit-move
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-13 23:18:55 +01:00
7f62c0b74c
Merge remote-tracking branch 'origin/feature/1469-webfinger-expanding' into webfinger-expanding
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-13 23:09:57 +01:00
5a4a7e775b
some cleanup, reports
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-13 17:58:24 +01:00
ca5ee8f0bf
MastoAPI: /api/v1/admin/reports
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-12 21:52:21 +01:00
48e87be7de
Merge remote-tracking branch 'soapbox/develop' into mastodon-admin-api
2022-02-11 22:53:22 +01:00
6836361398
MastoAPI: /api/v1/admin/accounts
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-11 22:36:00 +01:00
marcin mikołajczak
a80852ba05
Merge branch 'instance-rules' into 'develop'
...
Instance rules
See merge request soapbox-pub/soapbox!93
2022-02-08 19:20:44 +00:00
1f9317100e
Instance rules: Duplicate rule_controller_test, hope nobody notices
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-08 20:06:32 +01:00
Alex Gleason
502b63d8ea
Merge remote-tracking branch 'pleroma/develop' into merge-upstream
2022-02-06 12:31:53 -06:00
e473bcf7a0
Max media attachment count
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-06 17:41:15 +01:00
6d18e6595c
Instance rules
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-05 18:07:04 +01:00
Alex Gleason
cc18296627
Merge remote-tracking branch 'pleroma/develop' into merge-upstream
2022-02-02 13:57:47 -06:00
Alex Gleason
64b136e11e
Merge remote-tracking branch 'pleroma/quote-post' into merge-upstream
2022-02-02 13:57:43 -06:00
Alex Gleason
7c044a1841
FilterControllerTest: tag erratic test
2022-02-02 13:10:39 -06:00
Alex Gleason
6d710a0f7e
Merge remote-tracking branch 'origin/develop' into quote-post
2022-02-02 12:50:03 -06:00
Haelwenn (lanodan) Monnier
d1cc9e4eaf
Fix tests matching on "warn"
...
Moving it to "warning" would break tests on 1.12.x
2022-02-02 12:45:26 -06:00
Alex Gleason
bd81af731e
Tag erratic test
2022-02-02 12:29:53 -06:00
Alex Gleason
2d77976305
Add tests for mismatched context in replies
2022-02-02 12:19:35 -06:00
Alex Gleason
5a4e3aa715
Test that a Create/Note from Roadhouse validates
2022-02-02 11:02:23 -06:00
Alex Gleason
61dfeca1cc
Test that a Note from Roadhouse validates
2022-02-02 10:38:30 -06:00
Alex Gleason
93f5cd5c3b
Merge remote-tracking branch 'pleroma/quote-post' into merge-upstream
2022-01-30 10:58:18 -06:00
Alex Gleason
643f78cb22
InlineQuotePolicy: skip objects which already have an .inline-quote span
2022-01-30 10:57:29 -06:00
Alex Gleason
deff42f034
Merge remote-tracking branch 'origin/develop' into quote-post
2022-01-30 10:50:35 -06:00
Alex Gleason
dde02e9806
Merge remote-tracking branch 'pleroma/quote-post' into merge-upstream
2022-01-28 17:53:56 -06:00
Alex Gleason
4883b996ad
Actually, don't send _misskey_quote anymore
2022-01-28 17:53:19 -06:00
Alex Gleason
281ccab704
Merge remote-tracking branch 'pleroma/quote-post' into merge-upstream
2022-01-28 16:21:37 -06:00
Alex Gleason
108997b764
InlineQuotePolicy: improve the way Markdown quotes are displayed by other software
2022-01-28 16:07:17 -06:00
Alex Gleason
b73a53ec69
Handle Fedibird's new quoteUri field
2022-01-28 15:55:52 -06:00
Alex Gleason
ac3426cbca
Transmogrifier: federate quotes with _misskey_quote field
2022-01-28 14:06:32 -06:00
Alex Gleason
ac6b2fadcf
Merge remote-tracking branch 'pleroma/quote-post' into merge-upstream
2022-01-28 12:34:34 -06:00
Alex Gleason
5134e691f4
StatusView: return quote post inside a reblog
2022-01-28 12:33:55 -06:00
Alex Gleason
a4d8e2bef7
Merge remote-tracking branch 'pleroma/quote-post' into merge-upstream
2022-01-27 14:31:04 -06:00
Alex Gleason
8d2f370a51
Merge remote-tracking branch 'pleroma/mention-mrf-md' into merge-upstream
2022-01-27 14:30:57 -06:00
Alex Gleason
087e060d30
InlineQuotePolicy: don't add line breaks to markdown posts
2022-01-27 14:28:06 -06:00
Alex Gleason
3bf257171f
ForceMentionsInContent: improve display of Markdown posts
2022-01-27 14:15:06 -06:00
Alex Gleason
436f62781b
Merge remote-tracking branch 'pleroma/mentions-mrf-replies-only' into merge-upstream
2022-01-26 21:29:17 -06:00
Alex Gleason
27cb3d6273
ForceMentionsInContent: don't apply it to top-level posts
2022-01-26 21:24:26 -06:00
Alex Gleason
f73edd02f0
Merge remote-tracking branch 'pleroma/quote-post' into quote-visibility-fixes
2022-01-26 11:59:55 -06:00
Alex Gleason
91822c383c
StatusView: add quote_visible
param
2022-01-26 11:52:50 -06:00
Alex Gleason
660490c2ec
StatusView: fix quote visibility
2022-01-26 11:49:31 -06:00
Alex Gleason
5a1fa6bca2
CommonAPI: disallow quoting private posts through the API
2022-01-26 11:21:49 -06:00
Alex Gleason
f0c22f9bd7
Merge remote-tracking branch 'pleroma/inline-mention-self' into inline-mention-self
2022-01-25 12:36:56 -06:00
Alex Gleason
0604b0dd09
ForceMentionsInContent: don't mention self
2022-01-25 12:33:47 -06:00
Alex Gleason
93a340668f
Merge remote-tracking branch 'origin/develop' into quote-post
2022-01-25 11:57:04 -06:00
Alex Gleason
0f4e0e667e
Merge branch 'recipients-inline' into 'develop'
...
ForceMentionsInContent: wrap mentions in a span, fix the formatting
See merge request pleroma/pleroma!3620
2022-01-25 17:43:39 +00:00
Alex Gleason
1e740bf6d3
Merge remote-tracking branch 'pleroma/recipients-inline' into merge-upstream
2022-01-25 11:02:07 -06:00
Alex Gleason
440754d526
Merge remote-tracking branch 'pleroma/develop' into merge-upstream
2022-01-25 11:01:59 -06:00
Alex Gleason
99e9c2c668
Merge branch 'birth-dates' into 'develop'
...
Fix show_birthday
See merge request pleroma/pleroma!3621
2022-01-25 16:59:07 +00:00
Alex Gleason
65b4d2ce84
ForceMentionsInContent: fix order of mentions
2022-01-25 10:42:34 -06:00
ab12a05a43
AccountView: Add test for show_birthday
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-25 17:34:36 +01:00
Alex Gleason
25786c804b
Merge remote-tracking branch 'pleroma/develop' into merge-upstream
2022-01-25 09:39:25 -06:00
Alex Gleason
dd7977bb68
Merge branch 'birth-dates' into 'develop'
...
Birth dates
See merge request pleroma/pleroma!3608
2022-01-25 15:35:47 +00:00
Alex Gleason
6bc109b31d
Merge remote-tracking branch 'pleroma/recipients-inline' into recipients-inline
2022-01-24 20:20:04 -06:00
Alex Gleason
267184b70e
ForceMentionsInContentTest: return mentions in a not terrible format
2022-01-24 20:03:43 -06:00
Alex Gleason
51dd5a6e21
Merge remote-tracking branch 'pleroma/quote-post' into quote-improvements
2022-01-24 17:18:30 -06:00
Alex Gleason
7f1d82a523
Merge remote-tracking branch 'pleroma/develop' into merge-upstream
2022-01-24 16:55:39 -06:00
Alex Gleason
1cb8326cfb
Merge remote-tracking branch 'origin/develop' into quote-post
2022-01-24 16:48:37 -06:00
Alex Gleason
0571f8f553
Add InlineQuotePolicy to force quote URLs inline
2022-01-24 16:44:35 -06:00
Alex Gleason
683f96da00
Merge remote-tracking branch 'pleroma/quote-post' into quote-post
2022-01-23 16:10:36 -06:00
Alex Gleason
c04241eb4a
ActivityDraft: mix format, defensive actor ID
2022-01-23 16:03:46 -06:00
Alex Gleason
d39ccd8372
ActivityDraft: mention the OP of a quoted post
2022-01-23 15:46:44 -06:00
Alex Gleason
d903a6b85d
Return quote_url through the API, don't render quotes more than 1 level deep
2022-01-23 13:55:25 -06:00