Fix software update check not working

This commit is contained in:
KMY 2023-09-21 13:21:08 +09:00
parent c9ea868613
commit fa511c3eab

View file

@ -31,14 +31,14 @@ class SoftwareUpdateCheckService < BaseService
end end
def version def version
return @version if @version.present?
if ENV.fetch('UPDATE_CHECK_SOURCE', 'kmyblue') == 'kmyblue' if ENV.fetch('UPDATE_CHECK_SOURCE', 'kmyblue') == 'kmyblue'
@version = "#{Mastodon::Version.kmyblue_major}.#{Mastodon::Version.kmyblue_minor}" @version = "#{Mastodon::Version.kmyblue_major}.#{Mastodon::Version.kmyblue_minor}"
@version += '-lts' if Setting.check_lts_version_only @version += '-lts' if Setting.check_lts_version_only
else else
@version = Mastodon::Version.to_s.split('+')[0] @version = Mastodon::Version.to_s.split('+')[0]
end end
@version
end end
def process_update_notices!(update_notices) def process_update_notices!(update_notices)