FIX: better handling of invite links after they are redeemed

FIX: deprecate invite_passthrough_hours setting
This commit is contained in:
Arpit Jalan
2018-05-08 20:12:58 +05:30
parent edb97edf5f
commit 83245aa508
10 changed files with 56 additions and 58 deletions

View File

@@ -19,7 +19,7 @@ class InvitesController < ApplicationController
invite = Invite.find_by(invite_key: params[:id])
if invite.present?
if invite.present? && !invite.redeemed?
store_preloaded("invite_info", MultiJson.dump(
invited_by: UserNameSerializer.new(invite.invited_by, scope: guardian, root: false),
email: invite.email,
@@ -28,7 +28,7 @@ class InvitesController < ApplicationController
render layout: 'application'
else
flash.now[:error] = I18n.t('invite.not_found')
flash.now[:error] = I18n.t('invite.not_found_template', site_name: SiteSetting.title, base_url: Discourse.base_url)
render layout: 'no_ember'
end
end