Commit graph

120 commits

Author SHA1 Message Date
KMY
05ae3c1948 Fix limited_scope 2023-08-31 19:33:50 +09:00
KMY
725ffa0258 Fix api design misstake 2023-08-31 19:24:08 +09:00
KMY
bcf90e03af Improve db query with stay_privacy 2023-08-22 09:21:24 +09:00
KMY
5daf9cdf6e Add keep_privacy setting 2023-08-22 08:20:51 +09:00
KMY
f20da7bf74 Fix account own circle only when post 2023-08-22 06:46:17 +09:00
KMY
3af223275f Add circle visibility 2023-08-21 18:22:14 +09:00
KMY
c2221659d6 Change limited visibility reply to direct 2023-08-12 23:30:58 +09:00
KMY
c1f6d22ad2 Add limited_scope support 2023-08-12 22:49:28 +09:00
KMY
79062bfc2f Add mutual visibility support 2023-08-12 18:22:22 +09:00
KMY
cd00d7f533 Add sensitive words setting 2023-07-27 12:47:33 +09:00
KMY
03dabcad9c Add post_hash_tags_max setting 2023-07-24 12:45:34 +09:00
KMY
c553275381 Add ng words for post/update 2023-07-24 10:38:36 +09:00
KMY
12e12db39d Change silenced account searchability to private 2023-07-09 11:33:49 +09:00
KMY
ad5f9492fb Fix status reference worker parameters error 2023-07-06 13:23:38 +09:00
KMY
22ad776635 Add status references support 2023-07-06 12:55:11 +09:00
KMY
2196665969 Add disallow unlisted-public post setting 2023-07-04 16:32:35 +09:00
KMY
ca66c47649 Unlisted visibility with public searchability 2023-07-04 13:27:28 +09:00
KMY
20497e0c21 Add login visibility 2023-05-24 17:41:47 +09:00
KMY
507e00ccd0 Change post sensitive is force false without media 2023-05-20 22:00:06 +09:00
KMY
de9e4b964c Fix searchability api to compat with fedibird 2023-05-14 14:12:35 +09:00
KMY
2a54b76823 Bump to media attachments max on poll (disabled now) 2023-05-12 15:47:40 +09:00
KMY
081439a7dd Permit post has media_attachments and polls 2023-05-12 15:03:26 +09:00
KMY
3a1a6ba39e Merge commit '15fd712464' into kb_migration 2023-05-01 15:05:34 +09:00
KMY
a4e8dcc3c4 Fix api responses and add force_visibility 2023-04-13 09:53:24 +09:00
KMY
25c3915728 Add markdown selection support 2023-04-12 10:16:46 +09:00
KMY
bc48000dce Add public post to unlisted setting 2023-04-10 14:08:43 +09:00
KMY
1502668ee5 Support 5 or more media_attachments from activitypub 2023-04-07 20:26:52 +09:00
KMY
60d54b847e Fix searchability values 2023-04-06 13:50:08 +09:00
KMY
af20b1d2aa Add searchability support 2023-04-06 04:27:52 +09:00
KMY
a1284940eb Fix expiration unit bug 2023-03-21 13:02:22 +09:00
KMY
16079b4db5 Add status expiration 2023-03-21 11:12:33 +09:00
KMY
05211ac206 Add group account support 2023-03-14 12:15:31 +09:00
KMY
ed3abf4f2a Add public_unlisted scope as status privacy 2023-03-05 13:24:31 +09:00
Nick Schonning
717683d1c3
Autofix Rubocop remaining Layout rules (#23679) 2023-02-20 06:58:28 +01:00
Claire
d6930b3847
Add API parameter to safeguard unexpect mentions in new posts (#18350) 2023-02-13 16:36:29 +01:00
Brian Campbell
2d12948220
Fix idempotency when database writes are slow (#21840)
There is an idempotency key generated by clients when authoring a post,
and stored in Redis, to ensure that if a user or client retries posting
the same status, we don't get a duplicate.

Hachyderm.io has been experiencing some filesystem and database
performance issues, causing database writes to be slow. This can mean
that there are successful posts, but the reverse proxy returns 504
Gateway Timeout before the idempotency status has been updated; users or
clients who retry (such as Tusky which retries automatically, see
tuskyapp/Tusky#2951) can re-try the same post with the same idempotency
key before it has actually been recorded in Redis, leading to duplicate
posts.

To address this issue, move all of the database updates after the
initial transaction that creates the status into the
`postprocess_status!` method, so we can insert the idempotency key
immediately after the status has been created, significantly reducing
the window in which the status could be created but the idempotency key
not yet stored.

Note: this has not yet been tested; I'm submitting this PR for
discussion and to offer to the Hachyderm.io admins to try out to fix the
multiple posting problem.

Co-authored-by: Brian Campbell <brcampbell@beta.team>
2022-12-15 18:08:40 +01:00
Eugen Rochko
d17fb70131
Change how changes to media attachments are stored for edits (#17696)
* Change how changes to media attachments are stored for edits

Fix not being able to re-order media attachments

* Fix not broadcasting updates when polls/media is changed through ActivityPub

* Various fixes and improvements

* Update app/models/report.rb

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

* Add tracking of media attachment description changes

* Change poll in status edit to have a structure closer to the real one

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2022-03-09 09:06:17 +01:00
Eugen Rochko
c0327ff31f
Fix invalid language resulting in no fallback being set on statuses (#17722) 2022-03-09 08:46:05 +01:00
Eugen Rochko
b6d7726ecb
Remove language detection through cld3 (#17478)
* Remove language detection through cld3

* Update app/helpers/languages_helper.rb

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2022-02-08 02:41:17 +01:00
Eugen Rochko
6e50134a42
Add trending links (#16917)
* Add trending links

* Add overriding specific links trendability

* Add link type to preview cards and only trend articles

Change trends review notifications from being sent every 5 minutes to being sent every 2 hours

Change threshold from 5 unique accounts to 15 unique accounts

* Fix tests
2021-11-25 13:07:38 +01:00
Claire
216570ad98
Fix scheduled statuses decreasing statuses counts (#16791)
* Add tests

* Fix scheduled statuses decreasing statuses counts

Fixes #16774
2021-10-14 19:59:21 +02:00
ThibG
f08f880f58
Fix media not being marked sensitive when client sets a CW but no text (#13277)
Mastodon enforces the “sensitive” flag on media attachments whenever a toot
is posted with a Content Warning. However, it does so *after* potentially
converting the Content Warning to toot text (when there is no toot text),
which leads to inconsistent and surprising behavior for API clients.
This commit fixes this inconsistency.
2020-03-25 22:40:58 +01:00
Eugen Rochko
9660aa4543
Change local media attachments to perform heavy processing asynchronously (#13210)
Fix #9106
2020-03-08 23:56:18 +01:00
ThibG
5284e29e2f
Fix public posts from silenced accounts not being changed to unlisted visibility (#13096) 2020-03-08 16:11:49 +01:00
Eugen Rochko
339ce1c4e9
Add specific rate limits for posting and following (#13172) 2020-03-08 15:17:39 +01:00
ThibG
3babf8464b Add voters count support (#11917)
* Add voters count to polls

* Add ActivityPub serialization and parsing of voters count

* Add support for voters count in WebUI

* Move incrementation of voters count out of redis lock

* Reword “voters” to “people”
2019-09-29 22:58:01 +02:00
Eugen Rochko
23aeef52cc
Remove Salmon and PubSubHubbub (#11205)
* Remove Salmon and PubSubHubbub endpoints

* Add error when trying to follow OStatus accounts

* Fix new accounts not being created in ResolveAccountService
2019-07-06 23:26:16 +02:00
Eugen Rochko
f7f23b4a19
Add audio uploads (#11123)
* Add audio uploads

Fix #4827

Accept uploads of OGG, WAV, FLAC, OPUS and MP3 files, and converts
them to OGG. Media attachments get a new `audio` type. In the UI,
audio uploads are displayed identically to video uploads.

* Improve code style
2019-06-19 23:42:38 +02:00
ThibG
14f6ce2885 Record account suspend/silence time and keep track of domain blocks (#10660)
* Record account suspend/silence time and keep track of domain blocks

* Also unblock users who were suspended/silenced before dates were recorded

* Add tests

* Keep track of suspending date for users suspended through the CLI

* Show accurate number of accounts that would be affected by unsuspending an instance

* Change migration to set silenced_at and suspended_at

* Revert "Also unblock users who were suspended/silenced before dates were recorded"

This reverts commit a015c65d2d1e28c7b7cfab8b3f8cd5fb48b8b71c.

* Switch from using suspended and silenced to suspended_at and silenced_at

* Add post-deployment migration script to remove `suspended` and `silenced` columns

* Use Account#silence! and Account#suspend! instead of updating the underlying property

* Add silenced_at and suspended_at migration to post-migration

* Change account fabricator to translate suspended and silenced attributes

* Minor fixes

* Make unblocking domains always retroactive
2019-05-14 19:05:02 +02:00
Eugen Rochko
f1bc90ab50
Rename :poll to :preloadable_poll and :owned_poll to :poll on Status (#10401)
Also, fix some n+1 queries

Resolve #10365
2019-03-28 04:44:59 +01:00