Fix password reset for non-test env #4824

Closed
eugenijm wants to merge 1 commit from gitlab-mr-iid-1441 into develop
Member
No description provided.
Author
Member

Fixes Plug.Conn.NotSentError that causes a 500 error in a non-test env.

Fixes `Plug.Conn.NotSentError` that causes a 500 error in a non-test env.
Author
Member

Pleroma.Emails.Mailer.deliver_async returns
:ok when PleromaJobQueue is enabled and {:ok, _} when it's disabled. This causes an error in controller actions that expect {:ok, _} format (MastodonAPIController.password_reset and TwitterAPI.Controller.password_reset), which doesn't happen in tests where PleromaJobQueue is disabled.

`Pleroma.Emails.Mailer.deliver_async` returns `:ok` when `PleromaJobQueue` is enabled and `{:ok, _}` when it's disabled. This causes an error in controller actions that expect `{:ok, _}` format ([`MastodonAPIController.password_reset`](https://git.pleroma.social/pleroma/pleroma/blob/ca1efb0c02592a808411ce72769aba32a5ead2ff/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex#L1823) and [`TwitterAPI.Controller.password_reset`](https://git.pleroma.social/pleroma/pleroma/blob/ca1efb0c02592a808411ce72769aba32a5ead2ff/lib/pleroma/web/twitter_api/twitter_api_controller.ex#L439)), which doesn't happen in tests where `PleromaJobQueue` is disabled.

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pleroma/pleroma!4824
No description provided.