Change update check source to kmyblue origin

This commit is contained in:
KMY 2023-09-20 18:42:08 +09:00
parent ee6186a197
commit 7696216cbd
7 changed files with 19 additions and 4 deletions

View file

@ -27,11 +27,18 @@ class SoftwareUpdateCheckService < BaseService
end
def api_url
ENV.fetch('UPDATE_CHECK_URL', 'https://api.joinmastodon.org/update-check')
ENV.fetch('UPDATE_CHECK_URL', 'https://kmy.blue/update-check')
end
def version
@version ||= Mastodon::Version.to_s.split('+')[0]
return @version if @version.present?
if ENV.fetch('UPDATE_CHECK_SOURCE', 'kmyblue') == 'kmyblue'
@version = "#{Mastodon::Version.kmyblue_major}.#{Mastodon::Version.kmyblue_minor}"
@version += '-lts' if Setting.check_lts_version_only
else
@version = Mastodon::Version.to_s.split('+')[0]
end
end
def process_update_notices!(update_notices)