Commit graph

81 commits

Author SHA1 Message Date
KMY
c546939a40 Merge remote-tracking branch 'parent/main' into upstream-20240524 2024-05-24 08:33:49 +09:00
Renaud Chaput
2c5ab8f647
Remove the access token from Redux & context (#30275) 2024-05-22 14:45:18 +00:00
KMY
c4017eb993 Merge remote-tracking branch 'parent/main' into upstream-20240426 2024-04-26 09:16:08 +09:00
KMY(雪あすか)
95a18edaac
Add: #98 警告の通知に投稿情報を追加 (#684) 2024-04-01 08:54:29 +09:00
KMY(雪あすか)
4a9f549dd2
Fix: #660 絵文字リアクションのストリーミングを受信した時点で投稿のカウントが更新されない (#683) 2024-04-01 08:26:30 +09:00
KMY
76598bd542 Merge remote-tracking branch 'parent/main' into upstream-20240319 2024-03-19 09:15:20 +09:00
Claire
95a5713ff7
Fix accounts not getting imported into redux store for some filtered notification types (#29588) 2024-03-14 09:34:36 +00:00
KMY
8e94ed2cec Merge remote-tracking branch 'parent/main' into upstream-20240308 2024-03-12 09:27:01 +09:00
Eugen Rochko
c10bbf5fe3
Add notification policies and notification requests in web UI (#29433) 2024-03-11 15:02:21 +00:00
KMY(雪あすか)
bc0fefe76d
Fix: #517 「絵文字リアクション機能を使用する」設定を無効にしている時、絵文字リアクションの通知も表示されないようにする (#537)
* Fix: 新規登録のテストが特定時刻で落ちる問題

* Fix: #517 「絵文字リアクション機能を使用する」設定を無効にしている時、絵文字リアクションの通知も表示されないようにする
2024-02-13 09:06:43 +09:00
KMY(雪あすか)
eee362b9e0
Fix: #404 フィルターでhalf_warnを設定してると、クライアントアプリでタイムラインが読み込まれない (#410) 2024-01-03 22:10:02 +09:00
KMY
08f86bcb8f Merge commit '389a6cc4c0' into upstream-20231108 2023-11-08 10:41:10 +09:00
Renaud Chaput
f476d9dab2
Fix the notificationsUpdate call (#27758) 2023-11-07 14:18:59 +00:00
KMY(雪あすか)
d7f07ae80f
Fix: #241 リスト新着通知で、数日前の古い投稿についての通知が来る場合がある (#242)
* Fix: #241 リスト通知の重複についてとりあえずの対処

* Fix: 本家の通知バグ
2023-11-07 17:16:10 +09:00
KMY
52dac50826 Merge remote-tracking branch 'parent/main' into upstream-20231104 2023-11-04 09:10:13 +09:00
Renaud Chaput
3bf2a7296e
Use Immutable Record for accounts in Redux state (#26559) 2023-11-03 15:00:03 +00:00
KMY(雪あすか)
f8280ca5d9
Add: #95 リストへの新着投稿通知 (#192)
* Add: テーブル定義、内部処理

* Add: 通知の定期削除処理、自動削除、テスト

* Add: Web画面の表示、設定

* Fix test
2023-10-31 08:59:31 +09:00
KMY
fbb1a69a65 Merge remote-tracking branch 'parent/main' into kb_migration 2023-09-13 22:08:20 +09:00
Claire
520b570474
Fix notification permissions being requested immediately after login (#26472) 2023-09-12 18:27:01 +02:00
KMY
22ad776635 Add status references support 2023-07-06 12:55:11 +09:00
KMY
093cfdbb7b Merge commit 'c15c8c7aa8' into kb_migration 2023-06-01 17:30:18 +09:00
Renaud Chaput
44cd88adc4
Upgrade react-intl (#24906) 2023-05-31 23:43:39 +02:00
KMY
d6f8f19e31 Merge commit 'e58c36d308' into kb_migration 2023-05-25 08:46:53 +09:00
Renaud Chaput
d27216dc46
Enforce import order with ESLint (#25096) 2023-05-23 17:15:17 +02:00
KMY
ba3f60ba63 Merge commit 'c8181eb0a4' into kb_migration 2023-05-09 15:39:21 +09:00
Renaud Chaput
c8181eb0a4
Enforce stricter rules for Typescript files (#24910) 2023-05-09 03:11:56 +02:00
KMY
de951a0ef9 Add emoji reaction notification support 2023-02-26 18:09:25 +09:00
KMY
1c028a20ac Create new stream event type: emoji_reaction 2023-02-26 09:45:22 +09:00
Nick Schonning
06b68490d1
Enable eslint:recommended ruleset (#22433)
* Enable ESLint recommended ruleset

* Disable failing ESLint recommended rules

* Remove rules shadowed by eslint:recommended
2022-12-19 00:51:37 +09:00
Claire
55bef1e34f
Fix quickly switching notification filters resulting in empty or incorrect list (#19052)
Follow-up to #18960

The aforementioned PR fixed an issue in which switching notification filters
while notifications were loading prevented the query for the new filter from
running, but another issue remained: if the first query completed after the
second one, its results would override the second one, thus leading to the
same issue.

This commit cancels the first request if it is still running, before issuing
the second one.
2022-08-25 17:36:54 +02:00
Claire
afb8bc97d0
Fix quickly switching notification filters resulting in empty or incorrect list (#18960) 2022-08-25 04:29:00 +02: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
Eugen Rochko
2936f42a14
Add notifications for new reports (#18697) 2022-06-27 09:30:15 +02:00
Claire
f17e73da09
Fix streaming notifications not using quick filter logic (#18316)
Fixes #18309

The quickFilter logic was used on display and to request new notification
pages, but not for live updates. The main issue this caused is bump the unread
notifications count regardless of the quickFilter setting.

Since notifications are re-fetched when changing quickFilter settings, it is
safe to drop live notifications that do not match the selected filter.
2022-05-07 04:50:40 +02:00
Eugen Rochko
7b816eb5ae
Add notifications for new sign-ups (#16953) 2022-02-23 16:45:22 +01:00
Eugen Rochko
8f03b7a2fb
Add notifications when a reblogged status has been updated (#17404)
* Add notifications when a reblogged status has been updated

* Change wording to say "edit" instead of "update" and add missing controls

* Replace previous update notifications with the most up-to-date one
2022-02-11 22:20:19 +01:00
matildepark
79341d0f5f
Fix follow request count to dynamically update (#16652) 2021-08-25 17:46:29 +02:00
ThibG
79efcf8aad
Change notification permission handling (#15176)
* Change notification permission handling

- allow changing individual alert settings even if permission is not explicitly
  enabled (asks for permission on toggle)
- persist permission request banner dismissal across sessions through settings

* Add additional, more discrete message to grant permissions

* Change permission granting button design according to reviews

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2020-12-15 18:43:54 +01:00
abcang
a2da02626e
Fixed ESLint error (#15214)
* eslint --fix

* fix consistent-return

* fix promise/catch-or-return

* ignore import rule
2020-11-23 17:35:14 +01:00
Eugen Rochko
4790a126be
Add button to dismiss desktop notifications permissions banner (#15141) 2020-11-11 05:36:29 +01:00
ThibG
f54ca3d08e
Fix browser notification permission request logic (#13543)
* Add notification permission handling code

* Request notification permission when enabling any notification setting

* Add badge to notification settings when permissions insufficient

* Disable alerts by default, requesting permission and enable them on onboarding
2020-10-13 00:37:21 +02:00
Takeshi Umeda
f5d08f2417
Fix unread notification markers (#14897) 2020-09-29 15:30:56 +02:00
ThibG
ff89025979
Add unread notification markers (#14818)
* Add unread notification markers

Fixes #14804

* Allow IntersectionObserverArticle's children to be updated
2020-09-26 20:57:07 +02:00
Eugen Rochko
974b1b79ce
Add option to be notified when a followed user posts (#13546)
* Add bell button

Fix #4890

* Remove duplicate type from post-deployment migration

* Fix legacy class type mappings

* Improve query performance with better index

* Fix validation

* Remove redundant index from notifications
2020-09-18 17:26:45 +02:00
ThibG
5aff2a6957
Fix timeline markers not working on Chrome (#13887)
* Periodically save timeline markers

This saves timeline markers immediately upon message arrival, but not more
than once every 5 minutes.

This does not change how the markers are saved on closing the window,
except that it avoids submitting them if there is no need for it.

* Use the Fetch API when possible instead of XHR on window unload
2020-05-29 16:14:16 +02:00
Eugen Rochko
f52c988e12
Add announcements (#12662)
* Add announcements

Fix #11006

* Add reactions to announcements

* Add admin UI for announcements

* Add unit tests

* Fix issues

- Add `with_dismissed` param to announcements API
- Fix end date not being formatted when time range is given
- Fix announcement delete causing reactions to send streaming updates
- Fix announcements container growing too wide and mascot too small
- Fix `all_day` being settable when no time range is given
- Change text "Update" to "Announcement"

* Fix scheduler unpublishing announcements before they are due

* Fix filter params not being passed to announcements filter
2020-01-23 22:00:13 +01:00
ThibG
911cc14481 Add follow_request notification type (#12198)
* Add follow_request notification type

The notification type already existed in the backend but was never pushed
to the front-end. This also means translation strings were also available
for the backend, from the notification mailer.

Unlike other notification types, these are off by default, to match what
I remember of Gargron's view on the topic: that follow requests should not
clutter notifications and should instead be reviewed at the user's own
leisure in the dedicated column.

Since follow requests have their own column, I've deemed it unnecessary to
add a specific tab for them in the notification quick filter.

* Show follow request link in single-column if there are pending requests, even if account isn't locked

* Push follow requests from notifications to the follow_requests list

* Offer to accept or reject follow request from the notification

* Redesign follow request notification
2019-12-01 17:25:29 +01:00
ThibG
1a12943924 Fix notification filters not applying to poll options (#12269) 2019-11-04 13:01:50 +01:00
Eugen Rochko
ba0de8fb68
Fix updates being hidden behind pending items on unmounted components (#11898) 2019-09-21 09:12:13 +02:00
ThibG
577706987d Fix “load more” adding older toots/notifications to pending items (#11883) 2019-09-18 11:27:10 +02:00