Commit graph

69 commits

Author SHA1 Message Date
KMY
479c4fecc1 Merge remote-tracking branch 'parent/main' into upstream-20240403 2024-04-03 12:12:09 +09:00
Renaud Chaput
e47a3d00fe
Add API types for status and related objects (#29792) 2024-04-02 10:03:33 +00:00
KMY(雪あすか)
d315f23bed
Change: #428 emoji_reaction_available_serverプロパティをStatusからAccountオブジェクトに移動する (#434)
* Change: `emoji_reaction_available_server`プロパティを`Status`から`Account`オブジェクトに移動する

* Fix test
2024-01-09 10:43:59 +09:00
KMY(雪あすか)
0ed5577094
Fix: #94 ProcessReferencesServiceリファクタリング・編集時の参照引用変更バグ修正 (#329)
* Fix: `ProcessReferencesService`リファクタリング・編集時の参照引用変更バグ修正

* Fix test

* Fix index_with

* Fix to method chain
2023-12-06 13:39:55 +09:00
KMY(雪あすか)
37779910df
Fix: ローカルサーバーのスタンプ利用可否が正しく反映できない問題 (#219)
* Fix: ローカルサーバーのスタンプ利用可否が正しく反映できない問題

* 不要な分岐を削除

* Fix: Presenterの使用を中止(どうせキャッシュしてるので)
2023-11-02 13:56:26 +09:00
KMY(雪あすか)
45cc8fff7a
Add: #90 スタンプに対応していないと思われるサーバーの投稿からスタンプボタンを隠す設定 (#215) 2023-11-02 10:29:00 +09:00
KMY(雪あすか)
235bef36d0
Add: 検索許可「ローカルとフォロワー」 (#60) 2023-10-05 16:37:27 +09:00
KMY(雪あすか)
44b739a39a
Add: Webでの引用表示 (#50)
* Add compacted component

* 引用表示の間にコンテナをはさみ、不要なコードを削除

* 引用APIを作成、ついでにブロック状況を引用APIに反映

* テスト修正など

* 引用をキャッシュに登録

* `quote_id`が`quote_of_id`になったのをSerializerに反映

* Fix test

* 引用をフィルターの対象に含める設定+エラー修正

* ストリーミングの存在しないプロパティ削除によるエラーを修正

* Fix lint

* 他のサーバーから来た引用付き投稿を処理

* Fix test

* フィルター設定時エラーの調整

* 画像つき投稿のスタイルを調整

* 画像つき投稿の最大高さを調整

* 引用禁止・非表示の設定を追加

* ブロック対応

* マイグレーションコード調整

* 引用設定の翻訳を作成

* Lint修正

* 参照1つの場合は引用に変換する設定を削除

* 不要になったテストを削除

* ブロック設定追加、バグ修正

* 他サーバーへ引用送信・受け入れ
2023-10-02 11:12:51 +09:00
KMY
71c451a569 Cache status reference mark when posting 2023-09-15 12:21:41 +09:00
KMY
67729767a2 Merge remote-tracking branch 'origin/kb_patch' into kb_migration 2023-09-15 10:29:55 +09:00
KMY
82524fb659 Fix error 2023-09-15 10:12:08 +09:00
KMY
e0da14515f Merge branch 'kb_patch' into kb_development 2023-09-15 09:42:57 +09:00
KMY
c0ff0754a3 Fix timeline emoji_reactions N+1 problem 2023-09-15 09:31:12 +09:00
KMY
1f6047a43f Add expiration/limited/reference icon on timeline 2023-09-14 19:13:17 +09:00
KMY
d450549d14 Fix hiding emoji reactions from anonymous 2023-09-13 10:22:44 +09:00
KMY
ac33bc86fe Hide emoji reaction count 2023-09-13 10:07:23 +09:00
KMY
c1f6d22ad2 Add limited_scope support 2023-08-12 22:49:28 +09:00
KMY
ec16074def Add limited post icon 2023-08-12 22:04:22 +09:00
KMY
bd060f824b Fix limited visibility 2023-08-04 16:58:28 +09:00
KMY
152b8eb4e6 Merge commit '42698b4c5c' into kb_migration 2023-07-21 18:40:40 +09:00
Christian Schmidt
4c18928a93
Wrong count in response when removing favourite/reblog (#24365)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2023-07-19 09:02:30 +02:00
KMY
22ad776635 Add status references support 2023-07-06 12:55:11 +09:00
KMY
01fcf84604 Remove custom_emoji aliases property from part of rest api 2023-06-01 17:22:24 +09:00
KMY
20497e0c21 Add login visibility 2023-05-24 17:41:47 +09:00
KMY
5a638a9551 Add glitch-toc emoji_reaction support 2023-05-15 08:09:22 +09:00
KMY
57c15e0d7f Remove extra media attachments and support raw array 2023-04-22 17:10:11 +09:00
KMY
5a661415e2 Merge commit 'fac734b6a8' into kb_migration 2023-04-13 18:57:03 +09:00
KMY
fac734b6a8 Add emoji_reactions_count on status 2023-04-13 18:55:36 +09:00
KMY
25c3915728 Add markdown selection support 2023-04-12 10:16:46 +09:00
KMY
c459fcb78b Merge commit '55f59b4343' into kb_migration 2023-04-09 09:28:58 +09:00
KMY
0b9151859d Separate media_attachments property 2023-04-08 09:35:23 +09:00
KMY
4c975d32a1 Merge branch 'kb_development' into kb_migration 2023-04-07 17:32:40 +09:00
KMY
7d76d01795 Change visibility to visibility_ex 2023-04-06 20:28:05 +09:00
KMY
94cd200097 Merge remote-tracking branch 'origin/kb_development' into kb_migration 2023-04-06 16:57:01 +09:00
KMY
af20b1d2aa Add searchability support 2023-04-06 04:27:52 +09:00
KMY
7a4dc84202 Merge remote-tracking branch 'parent/main' into kb_migration 2023-03-18 13:30:34 +09:00
Christian Schmidt
bd047acc35
Replace Status#translatable? with language matrix in separate endpoint (#24037) 2023-03-16 11:07:24 +01:00
KMY
9e2390f3c9 Merge branch 'kb_development' into kb_migration 2023-03-08 16:38:48 +09:00
KMY
ed3abf4f2a Add public_unlisted scope as status privacy 2023-03-05 13:24:31 +09:00
KMY
370f25f3cd Merge commit 'aa98c8fbeb' into kb_migration 2023-03-04 09:46:40 +09:00
Christian Schmidt
5a8c651e8f
Only offer translation for supported languages (#23879) 2023-03-03 21:06:31 +01:00
KMY
092f9916b0 Add emoji_reactions property to status api object 2023-02-23 20:32:27 +09:00
Claire
02851848e9
Revamp post filtering system (#18058)
* Add model for custom filter keywords

* Use CustomFilterKeyword internally

Does not change the API

* Fix /filters/edit and /filters/new

* Add migration tests

* Remove whole_word column from custom_filters (covered by custom_filter_keywords)

* Redesign /filters

Instead of a list, present a card that displays more information and handles
multiple keywords per filter.

* Redesign /filters/new and /filters/edit to add and remove keywords

This adds a new gem dependency: cocoon, as well as a npm dependency:
cocoon-js-vanilla. Those are used to easily populate and remove form fields
from the user interface when manipulating multiple keyword filters at once.

* Add /api/v2/filters to edit filter with multiple keywords

Entities:
- `Filter`: `id`, `title`, `filter_action` (either `hide` or `warn`), `context`
  `keywords`
- `FilterKeyword`: `id`, `keyword`, `whole_word`

API endpoits:
- `GET /api/v2/filters` to list filters (including keywords)
- `POST /api/v2/filters` to create a new filter
  `keywords_attributes` can also be passed to create keywords in one request
- `GET /api/v2/filters/:id` to read a particular filter
- `PUT /api/v2/filters/:id` to update a new filter
  `keywords_attributes` can also be passed to edit, delete or add keywords in
   one request
- `DELETE /api/v2/filters/:id` to delete a particular filter
- `GET /api/v2/filters/:id/keywords` to list keywords for a filter
- `POST /api/v2/filters/:filter_id/keywords/:id` to add a new keyword to a
   filter
- `GET /api/v2/filter_keywords/:id` to read a particular keyword
- `PUT /api/v2/filter_keywords/:id` to edit a particular keyword
- `DELETE /api/v2/filter_keywords/:id` to delete a particular keyword

* Change from `irreversible` boolean to `action` enum

* Remove irrelevent `irreversible_must_be_within_context` check

* Fix /filters/new and /filters/edit with update for filter_action

* Fix Rubocop/Codeclimate complaining about task names

* Refactor FeedManager#phrase_filtered?

This moves regexp building and filter caching to the `CustomFilter` class.

This does not change the functional behavior yet, but this changes how the
cache is built, doing per-custom_filter regexps so that filters can be matched
independently, while still offering caching.

* Perform server-side filtering and output result in REST API

* Fix numerous filters_changed events being sent when editing multiple keywords at once

* Add some tests

* Use the new API in the WebUI

- use client-side logic for filters we have fetched rules for.
  This is so that filter changes can be retroactively applied without
  reloading the UI.
- use server-side logic for filters we haven't fetched rules for yet
  (e.g. network error, or initial timeline loading)

* Minor optimizations and refactoring

* Perform server-side filtering on the streaming server

* Change the wording of filter action labels

* Fix issues pointed out by linter

* Change design of “Show anyway” link in accordence to review comments

* Drop “irreversible” filtering behavior

* Move /api/v2/filter_keywords to /api/v1/filters/keywords

* Rename `filter_results` attribute to `filtered`

* Rename REST::LegacyFilterSerializer to REST::V1::FilterSerializer

* Fix systemChannelId value in streaming server

* Simplify code by removing client-side filtering code

The simplifcation comes at a cost though: filters aren't retroactively
applied anymore.
2022-06-28 09:42:13 +02:00
rinsuki
275dad9702
fix: returns nil instead of empty URL on status.application.website (#17962) 2022-04-05 12:00:31 +02:00
Eugen Rochko
cefa526c6d
Refactor formatter (#17828)
* Refactor formatter

* Move custom emoji pre-rendering logic to view helpers

* Move more methods out of Formatter

* Fix code style issues

* Remove Formatter

* Add inline poll options to RSS feeds

* Remove unused helper method

* Fix code style issues

* Various fixes and improvements

* Fix test
2022-03-26 02:53:34 +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
1060666c58
Add support for editing for published statuses (#16697)
* Add support for editing for published statuses

* Fix references to stripped-out code

* Various fixes and improvements

* Further fixes and improvements

* Fix updates being potentially sent to unauthorized recipients

* Various fixes and improvements

* Fix wrong words in test

* Fix notifying accounts that were tagged but were not in the audience

* Fix mistake
2022-01-19 22:37:27 +01:00
Claire
c60f8ce032
Fix pinned attribute not being set for private self-posts (#17304) 2022-01-17 11:59:46 +01:00
Takeshi Umeda
d6fe0c94ca
Add account sensitized (#14361)
* Add account sensitized

* Fix i18n normalize

* Fix description and spec

* Fix spec

* Fix wording
2020-11-04 20:45:01 +01:00
Eugen Rochko
92e7c84969
Fix punycode being returned in some entities instead of unicode in REST API (#13035) 2020-02-03 21:16:37 +01:00