From b13f1d470a29e37d02096caf79fc339917649a3d Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 31 Aug 2018 20:33:01 +0200 Subject: [PATCH 1/5] Do not show follow button on moved or memorial accounts (#8546) This restores the logic from before the public profile redesign. Fixes #8503 --- app/helpers/stream_entries_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/stream_entries_helper.rb b/app/helpers/stream_entries_helper.rb index 187bfe4a06..ac655f6227 100644 --- a/app/helpers/stream_entries_helper.rb +++ b/app/helpers/stream_entries_helper.rb @@ -22,12 +22,12 @@ module StreamEntriesHelper link_to account_unfollow_path(account), class: 'button logo-button button--destructive', data: { method: :post } do safe_join([render(file: Rails.root.join('app', 'javascript', 'images', 'logo.svg')), t('accounts.unfollow')]) end - else + elsif !(account.memorial? || account.moved?) link_to account_follow_path(account), class: 'button logo-button', data: { method: :post } do safe_join([render(file: Rails.root.join('app', 'javascript', 'images', 'logo.svg')), t('accounts.follow')]) end end - else + elsif !(account.memorial? || account.moved?) link_to account_remote_follow_path(account), class: 'button logo-button modal-button', target: '_new' do safe_join([render(file: Rails.root.join('app', 'javascript', 'images', 'logo.svg')), t('accounts.follow')]) end From 32d31528522fd7b1064b75e238e0efb2516dd27b Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 1 Sep 2018 03:35:37 +0200 Subject: [PATCH 2/5] Fix wrong string being used on login failure when using LDAP (#8534) Fix #8527 --- lib/devise/ldap_authenticatable.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/devise/ldap_authenticatable.rb b/lib/devise/ldap_authenticatable.rb index 534c7a8517..6903d468dc 100644 --- a/lib/devise/ldap_authenticatable.rb +++ b/lib/devise/ldap_authenticatable.rb @@ -25,11 +25,12 @@ module Devise ) filter = format(Devise.ldap_search_filter, uid: Devise.ldap_uid, email: email) + if (user_info = ldap.bind_as(base: Devise.ldap_base, filter: filter, password: password)) user = User.ldap_get_user(user_info.first) success!(user) else - return fail(:invalid_login) + return fail(:invalid) end end end From 150ec6646181b160b72208b39ff921dca161d2ed Mon Sep 17 00:00:00 2001 From: trwnh Date: Fri, 31 Aug 2018 20:36:36 -0500 Subject: [PATCH 3/5] Fix the display of missing lists (#8523) * Fix the display of missing lists See #6786 -- this fixes part of the issue pertaining to lists that don't exist. I copied the Column being returned from the missing status logic, which works fine. Prior to this, the missing lists logic would generate a column with no back button and with a broken layout. This doesn't fix the broken display of missing accounts -- the column construction pertaining to that logic happens in multiple external functions. * import ColumnBackButton missed the import with the first commit --- app/javascript/mastodon/features/list_timeline/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/features/list_timeline/index.js b/app/javascript/mastodon/features/list_timeline/index.js index 164669e89c..a655451b18 100644 --- a/app/javascript/mastodon/features/list_timeline/index.js +++ b/app/javascript/mastodon/features/list_timeline/index.js @@ -4,6 +4,7 @@ import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import StatusListContainer from '../ui/containers/status_list_container'; import Column from '../../components/column'; +import ColumnBackButton from '../../components/column_back_button'; import ColumnHeader from '../../components/column_header'; import { addColumn, removeColumn, moveColumn } from '../../actions/columns'; import { FormattedMessage, defineMessages, injectIntl } from 'react-intl'; @@ -129,9 +130,8 @@ export default class ListTimeline extends React.PureComponent { } else if (list === false) { return ( -
- -
+ +
); } From 894e01163ba2b39b9c0b3b7bed08831723e99719 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 1 Sep 2018 03:37:43 +0200 Subject: [PATCH 4/5] Bump version to 2.5.0rc2 --- lib/mastodon/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index a490478cd7..ded1292f9d 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -21,7 +21,7 @@ module Mastodon end def flags - 'rc1' + 'rc2' end def to_a From 35beafabe903e4ad5b8d43c47eb776ff1d9c5377 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Sat, 1 Sep 2018 23:09:24 +0900 Subject: [PATCH 5/5] Fix static URL when disable autoplay (#8548) --- app/views/stream_entries/_detailed_status.html.haml | 4 ++-- app/views/stream_entries/_simple_status.html.haml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml index bf5f614a11..d0d9cc5fc5 100644 --- a/app/views/stream_entries/_detailed_status.html.haml +++ b/app/views/stream_entries/_detailed_status.html.haml @@ -2,9 +2,9 @@ = link_to TagManager.instance.url_for(status.account), class: 'detailed-status__display-name p-author h-card', target: stream_link_target, rel: 'noopener' do .detailed-status__display-avatar - if current_account&.user&.setting_auto_play_gif || autoplay - = image_tag status.account.avatar.url(:original), width: 48, height: 48, alt: '', class: 'account__avatar u-photo' + = image_tag status.account.avatar_original_url, width: 48, height: 48, alt: '', class: 'account__avatar u-photo' - else - = image_tag status.account.avatar.url(:static), width: 48, height: 48, alt: '', class: 'account__avatar u-photo' + = image_tag status.account.avatar_static_url, width: 48, height: 48, alt: '', class: 'account__avatar u-photo' %span.display-name %bdi %strong.display-name__html.p-name.emojify= display_name(status.account, custom_emojify: true, autoplay: autoplay) diff --git a/app/views/stream_entries/_simple_status.html.haml b/app/views/stream_entries/_simple_status.html.haml index e147596f69..fc2cacf30a 100644 --- a/app/views/stream_entries/_simple_status.html.haml +++ b/app/views/stream_entries/_simple_status.html.haml @@ -8,9 +8,9 @@ .status__avatar %div - if current_account&.user&.setting_auto_play_gif || autoplay - = image_tag status.account.avatar(:original), width: 48, height: 48, alt: '', class: 'u-photo account__avatar' + = image_tag status.account.avatar_original_url, width: 48, height: 48, alt: '', class: 'u-photo account__avatar' - else - = image_tag status.account.avatar(:static), width: 48, height: 48, alt: '', class: 'u-photo account__avatar' + = image_tag status.account.avatar_static_url, width: 48, height: 48, alt: '', class: 'u-photo account__avatar' %span.display-name %bdi %strong.display-name__html.p-name.emojify= display_name(status.account, custom_emojify: true, autoplay: autoplay)