about summary refs log tree commit diff
path: root/app/models/notification.rb
AgeCommit message (Collapse)Author
2019-11-19Add `account_id` param to `GET /api/v1/notifications` (#10796)Paul Woolcock
* 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-03-28Rename :poll to :preloadable_poll and :owned_poll to :poll on Status (#10401)Eugen Rochko
Also, fix some n+1 queries Resolve #10365
2019-03-11Support pushing and receiving updates to poll tallies (#10209)ThibG
* 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
2018-11-19Extract counters from accounts table to account_stats table (#9295)Eugen Rochko
2018-11-16Remove intermediary arrays when creating hash maps from results (#9291)Eugen Rochko
2018-10-17Improve support for aspects/circles (#8950)Eugen Rochko
* 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-08-21Remove annoying Notification#cache_ids scope warning (#8333)Eugen Rochko
2018-04-23Update dependencies for Ruby (2018-04-23) (#7237)Yamagishi Kazutoshi
* Update annotate to version 2.7.3 * Update aws-sdk-s3 to version 1.9.2 * Update browser to version 2.5.3 * Update capistrano to version 3.10.2 * Update domain_name to version 0.5.20180417 * Update http to version 3.2.0 * Update lograge to version 0.10.0 * Update oj to version 3.5.1 * Update parallel_tests to version 2.21.3 * Update puma to version 3.11.4 * Update rubocop to version 0.55.0 * Update scss_lint to version 0.57.0 * Update simplecov to version 0.16.1 * Update tty-command to version 0.8.0 * Update tty-prompt to version 0.16.0 * Update pkg-config to version 1.3.0 * Update fog-local to version 0.5.0 * Update fog-openstack to version 0.1.25 * Update devise-two-factor to version 3.0.3 * bundle update
2018-04-12Upgrade Rails to version 5.2.0 (#5898)Yamagishi Kazutoshi
2018-03-24Change columns in notifications nonnullable (#6764)Akihiko Odaki
2018-02-08Clear account cache of notification target_status (#6442)abcang
2018-01-19Change belongs_to_required_by_default to true (#5888)Yamagishi Kazutoshi
2017-11-19Fix N+1 at notification (#5752)abcang
2017-11-18Lists (#5703)Eugen Rochko
* Add structure for lists * Add list timeline streaming API * Add list APIs, bind list-account relation to follow relation * Add API for adding/removing accounts from lists * Add pagination to lists API * Add pagination to list accounts API * Adjust scopes for new APIs - Creating and modifying lists merely requires "write" scope - Fetching information about lists merely requires "read" scope * Add test for wrong user context on list timeline * Clean up tests
2017-11-12Update model annotations to use BIGINT for IDs (#5461)Daniel Hunsaker
All the migrations have been updated to use BIGINTs for ID fields in the DB, but ActiveRecord needs to be told to treat those values as BIGINT as well. This PR does that.
2017-10-13Fix UserTrackingConcern firing on every request, optimize some queries (#5368)Eugen Rochko
- For some reason, :if option on before_action did not work. It got executed every time, returned false, and the action run anyway, which led to the current_sign_in_at and sign_in_count being updated on every request - Return "do not filter" early in FeedManager#filter_from_home? if the status is authored by receiver. Usually this method is not called for own statuses at all, but it is called when Feed#get uses the database - Return early if #reload_stale_associations! has nothing to load to save a database query with WHERE 1=0
2017-06-01Update Rails to version 5.1.1 (#3121)Matt Jankowski
* Update rails to version 5.1.1 * Run `rails app:update` * Remove the override of polymorphic activity relationship * Silence warning about otp_secret attribute being unknown to rails * We will only introduce form_with where we want to use remote data
2017-05-25Remove arguments in association reader (#3305)Yamagishi Kazutoshi
2017-05-06Fixes slow query in notifications api (#2851)alpaca-tc
* Add inclusion validation for activity_type * When excluding all types with `WHERE NOT IN`, the query search all rows.
2017-05-02annotate models (#2697)yhirano
* add annotate to Gemfile * rails g annotate:install * configure annotate_models * add schema info to models * fix rubocop to add frozen_string_literal
2017-04-10API param to exclude notification types from response (#1341)Eugen
* Add exclude_types param to /api/v1/notifications * Exclude notification types in web UI through exclude_types in the API
2017-01-26Removed accidental n+1 query from notifications, updated some deps,Eugen Rochko
improved how "show more" link looks
2017-01-22Mitigate inconsistent notificationsEugen
2016-12-26Follow requests send e-mail notifications, but are excluded from ↵Eugen Rochko
notifications API Better initial state for unlisted/nsfw toggles
2016-12-03Improve notification modelEugen Rochko
2016-12-03Fix #248 - Reload all accounts when fetching from cacheEugen Rochko
2016-11-30Further abstract caching for includesEugen Rochko
2016-11-22Remove unneeded indices, improve error handling in background workers, don't ↵Eugen Rochko
needlessly reload reblogged status, send Devise e-mails asynchronously
2016-11-21Remove some n+1 queries from notifications APIEugen Rochko
2016-11-20Adding unified streamable notificationsEugen Rochko