Commit Graph
74 Commits
Author SHA1 Message Date
David Roetzel dc53b0e077 Destroy dependent notifications of a collection (#39429) 2026-06-15 17:01:10 +02:00
Claire 5b395774c0 Add fallback attributes to notifications for new and infrequent notifications (#38832) 2026-04-29 15:53:29 +00:00
Shlee f429019f34 Missing .freeze on collection_update reference in notification.rb (#38628) 2026-04-09 14:36:54 +00:00
Claire 66fdd3ae65 Fix serialization of added_to_collection notifications (#38612) 2026-04-08 16:40:51 +00:00
Claire 39c70649ca Add added_to_collection and collection_updated notification types (#38491) 2026-04-08 12:56:07 +00:00
Matt Jankowski bf32befcc2 Run annotaterb models after bug fix to re-order model comments (#38172) 2026-03-12 14:00:41 +00:00
Claire f3a932d8a1 Add quoted_update notification type (#35820) 2025-08-25 15:44:18 +00:00
Claire 80aadc55df Add missing mailer for quote notifications (#35652) 2025-08-04 10:44:59 +00:00
Claire 29a5f059d2 Add notifications for inbound quotes (#35618) 2025-08-01 09:12:46 +00:00
Matt Jankowski f2976ec9a4 Extract Notification::Groups concern (#32968) 2024-11-19 10:02:01 +00:00
Eugen Rochko d6349c0e9a Add year in review feature to web UI (#32709) 2024-11-05 14:40:07 +00:00
Renaud Chaput d6f5ee75ab Add notification grouping for follow notifications (#32085) 2024-09-25 13:36:19 +00:00
Claire ad0a28a8bf Add grouped_types parameter to allow clients to restrict which notifications types get grouped (#31594) 2024-08-29 12:39:07 +00:00
Claire 711e1fce0a Fix pagination parameters in GET /api/v2_alpha/notificatins (#31509) 2024-08-20 13:54:08 +00:00
Claire 3a49687ca0 Fix performance issue by using LATERAL in group notification CTE (#31123) 2024-07-24 18:59:15 +00:00
Claire 2774980589 Fix syntax error in grouped notifications CTE on some PostgreSQL versions (#31098) 2024-07-22 07:37:27 +00:00
f587ff643f Grouped Notifications UI (#30440)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2024-07-18 14:36:09 +00:00
Claire 37f53542fe Fix limit handling in grouped notifications CTE (#30685) 2024-06-13 12:42:40 +00:00
Claire 974335e414 Add experimental server-side notification grouping (#29889) 2024-06-03 08:35:59 +00:00
Claire e845594878 Fix moderator account being exposed in account moderation notification (#30082) 2024-04-26 12:42:06 +00:00
Claire 4ef0b48b95 Add in-app notifications for moderation actions/warnings (#30065) 2024-04-25 17:26:05 +00:00
Claire 98a2bb8be2 Fix issue with severed relationships notifications (#29668) 2024-03-20 17:02:09 +00:00
Claire 44bf7b8128 Add notifications of severed relationships (#27511) 2024-03-20 15:37:21 +00:00
Claire b43eaa4517 Refactor notification filtering behavior definition (#29567) 2024-03-13 10:35:49 +00:00
Eugen Rochko 50b17f7e10 Add notification policies and notification requests (#29366) 2024-03-07 14:53:37 +00:00
Claire dcc24db793 Fix N+1s because of association preloaders not actually getting called (#28339) 2023-12-13 07:47:32 +00:00
Matt Jankowski ce43ed144c Rails 7.0 update (#25668) 2023-07-13 09:36:07 +02:00
Eugen Rochko ba06a2f104 Revert "Rails 7 update" (#25667) 2023-07-02 11:14:22 +02:00
Matt Jankowski 50c2a03695 Rails 7 update (#24241) 2023-07-02 10:38:53 +02:00
Matt JankowskiandClaire 9f5deb310b Fix Performance/MapCompact cop (#24797)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2023-05-23 10:49:12 +02:00
Matt Jankowski af824db398 Fix Rails/InverseOf cop (#24732) 2023-04-30 14:06:53 +02:00
Nick Schonning 717683d1c3 Autofix Rubocop remaining Layout rules (#23679) 2023-02-20 06:58:28 +01:00
Nick Schonning 2177daeae9 Autofix Rubocop Style/RedundantBegin (#23703) 2023-02-19 07:09:40 +09:00
Eugen Rochko 2936f42a14 Add notifications for new reports (#18697) 2022-06-27 09:30:15 +02:00
Eugen Rochko e6ffbfb5e7 Add types param to GET /api/v1/notifications in REST API (#17767)
* Add `types` param to `GET /api/v1/notifications` in REST API

* Improve tests
2022-03-15 04:11:29 +01: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
Claire 43eff898a0 Prepare Mastodon for Rails 6 (#15911)
* Fix misuse of foreign_type

* Fix use of removed "add_template_helper"

* Use response.media_type instead of response.content_type in tests

* Fix CSV export controller test on Rails 6

Rails 6 sets a "filename*" field in the Content-Disposition header to
explicitly encode the filename as UTF-8.

This changes checks the first part of the Content-Disposition header so
it matches in both Rails 5 and Rails 6.

* Fix emoji formatting with Rails 6

* Make emoji output more idiomatic and robust

* Switch from redis-rails gem to built-in Rails redis cache storage
2021-03-17 10:09:55 +01:00
abcang 7ab53f221a Improved performance of notification preloading (#15640)
* Improved performance of notification preloading

* Remove Cacheable from Notification

* Fix test
2021-01-31 21:24:57 +01:00
ThibGandClaire 54d4e5252b Use Rails' index_by where it makes sense (#15542)
* Use Rails' index_by where it makes sense

* Fix tests

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2021-01-12 09:27:38 +01:00
luigi 087ed84367 Optimize map { ... }.compact calls (#15513)
* Optimize map { ... }.compact

using Enumerable#filter_map, supported since Ruby 2.7

* Add poyfill for Enumerable#filter_map
2021-01-10 00:32:01 +01: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
Eugen Rochko e6b272e5c9 Change REST API to return empty data for suspended accounts (#14765) 2020-09-11 15:16:29 +02: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
Paul Woolcock 0c933c1b8c Add account_id param to GET /api/v1/notifications (#10796)
* Add `from_account` to notifications API

this adds the ability to filter notifications by the account they
originated from

* passing a non-existent user should cause none to be returned

* Fix codeclimate warnings

* fix more codeclimate warnings

* make requested changes:

* use account id instead of user@domain
* name the param `account_id` instead of `from_account`

* Don't use `return` in a lambda
2019-05-21 13:28:49 +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
ThibG 3a92885a86 Support pushing and receiving updates to poll tallies (#10209)
* Process incoming poll tallies update

* Send Update on poll vote

* Do not send Updates for a poll more often than once every 3 minutes

* Include voters in people to notify of results update

* Schedule closing poll worker on poll creation

* Add new notification type for ending polls

* Add front-end support for ended poll notifications

* Fix UpdatePollSerializer

* Fix Updates not being triggered by local votes

* Fix tests failure

* Fix web push notifications for closing polls

* Minor cleanup

* Notify voters of both remote and local polls when those close

* Fix delivery of poll updates to mentioned accounts and voters
2019-03-11 00:49:31 +01:00
Eugen Rochko d6b9a62e0a Extract counters from accounts table to account_stats table (#9295) 2018-11-19 00:43:52 +01:00
Eugen Rochko 8069fd636b Remove intermediary arrays when creating hash maps from results (#9291) 2018-11-16 15:02:18 +01:00
Eugen Rochko ddd30f331c Improve support for aspects/circles (#8950)
* Add silent column to mentions

* Save silent mentions in ActivityPub Create handler and optimize it

Move networking calls out of the database transaction

* Add "limited" visibility level masked as "private" in the API

Unlike DMs, limited statuses are pushed into home feeds. The access
control rules between direct and limited statuses is almost the same,
except for counter and conversation logic

* Ensure silent column is non-null, add spec

* Ensure filters don't check silent mentions for blocks/mutes

As those are "this person is also allowed to see" rather than "this
person is involved", therefore does not warrant filtering

* Clean up code

* Use Status#active_mentions to limit returned mentions

* Fix code style issues

* Use Status#active_mentions in Notification

And remove stream_entry eager-loading from Notification
2018-10-17 17:13:04 +02:00