Skip to content

Fixed NotificationMailer failing with mentions#11765

Merged
Gargron merged 1 commit intomastodon:masterfrom
mayaeh:fix_notification_mailer_mention_remote
Sep 5, 2019
Merged

Fixed NotificationMailer failing with mentions#11765
Gargron merged 1 commit intomastodon:masterfrom
mayaeh:fix_notification_mailer_mention_remote

Conversation

@mayaeh
Copy link
Copy Markdown
Contributor

@mayaeh mayaeh commented Sep 5, 2019

If you receive a mention with media from a remote instance, the following error may occur.

Job: NotificationMailer#mention
Class: ActionView::Template::Error
Message: No route matches {:action=>"show", :controller=>"media", :id=>#<MediaAttachment id: xxxxx, status_id: xxxxx, file_file_name: “xxxxx.png", file_content_type: "image/png", file_file_size: xxxxx, file_updated_at: "2019-09-04 12:57:35", remote_url: "https://example.com/…”, account_id: xxxxx, created_at: "2019-09-04 12:57:35", updated_at: "2019-09-04 12:57:36", shortcode: nil, type: "image", file_meta: {"original"=>{"width"=>346, "height"=>309, "size"=>"346x309", "aspect"=>1.1197411003236246}, "small"=>{"width"=>346, "height"=>309, "size"=>"346x309", "aspect"=>1.1197411003236246}}, description: nil, scheduled_status_id: nil, blurhash: "U268U2?IogRk_4%MadIos:xtaJIV%Nt6ofR+">}, possible unmatched constraints: [:id]

This happens with accounts that have email notifications enabled for mentions.

This PR fix it.

@Gargron Gargron merged commit e265b88 into mastodon:master Sep 5, 2019
@mayaeh mayaeh deleted the fix_notification_mailer_mention_remote branch September 5, 2019 04:16
hiyuki2578 pushed a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants