Where possible, it is a good idea to add new backend code in ways that
will minimize conflict with upstream changes. We can't do that
everywhere, but we can move our custom methods to a module that won't
be modified upstream, and that's a start.
This commit also gets the block/mute note maps into
REST::RelationshipSerializer under the "block_notes" and "mute_notes"
keys.
In this commit, we also push note creation into the AccountInteractions
concern, where we can:
1. create and persist model objects inside transactions without having
to include job queuing inside the transaction
2. commonize the don't-add-a-blank-note check
Finally, this commit resolves a invocation-on-nil in
REST::RelationshipSerializer.
This is a model for attaching a single note to a single other entity.
For #193, we'll use it for annotating blocks, mutes, and account-level
domain blocks.
UserTrackingConcern is circumvented by SessionsController#create
because it calls warden, which calls the User#update_tracked_fields!
method directly. Move returning user logic to that method.
A change introduced in #6125 prevents
`Devise::Models::Confirmable#confirm` from being called for existing
users, which in turn leads to `email` not being set to
`unconfirmed_email`, breaking email updates. This also adds a test
that would've caught this issue.
* Add confirmation step for email changes
This adds a confirmation step for email changes of existing users.
Like the initial account confirmation, a confirmation link is sent
to the new address.
Additionally, a notification is sent to the existing address when
the change is initiated. This message includes instruction to reset
the password immediately or to contact the instance admin if the
change was not initiated by the account owner.
Fixes#3871
* Add review fixes
* Add GET /api/v1/instance/peers API to reveal known domains
* Add GET /api/v1/instance/activity API
* Make new APIs disableable, exclude private statuses from activity stats
* Fix code style issue
* Fix week timestamps
This commit also:
- exposes the local-only emoji so that it can be used in examples
- allows local_only to be set explicitly, i.e. for timeline filtering
specs