Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed NotificationMailer failing with mentions #11765

Merged

Conversation

mayaeh
Copy link
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.

None yet

2 participants