Skip to content

Commit 106bb08

Browse files
committed
If the client is branded the default update channel is stable.
Signed-off-by: Camila Ayres <[email protected]>
1 parent 94736b2 commit 106bb08

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/libsync/configfile.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,10 @@ QStringList ConfigFile::validUpdateChannels() const
703703

704704
QString ConfigFile::defaultUpdateChannel() const
705705
{
706-
if (serverHasValidSubscription() && !Theme::instance()->isBranded()) {
706+
const auto isBranded = Theme::instance()->isBranded();
707+
auto defaultChannel = defaultUpdateChannelName;
708+
709+
if (serverHasValidSubscription() && !isBranded) {
707710
if (const auto serverChannel = desktopEnterpriseChannel();
708711
validUpdateChannels().contains(serverChannel)) {
709712
qCWarning(lcConfigFile()) << "Enforcing update channel" << serverChannel << "because that is the desktop enterprise channel returned by the server.";
@@ -712,11 +715,12 @@ QString ConfigFile::defaultUpdateChannel() const
712715
}
713716

714717
if (const auto currentVersionSuffix = Theme::instance()->versionSuffix();
715-
validUpdateChannels().contains(currentVersionSuffix)) {
718+
validUpdateChannels().contains(currentVersionSuffix) && !isBranded) {
716719
qCWarning(lcConfigFile()) << "Enforcing update channel" << currentVersionSuffix << "because of the version suffix of the current client.";
717720
return currentVersionSuffix;
718721
}
719722

723+
qCWarning(lcConfigFile()) << "Enforcing default update channel" << defaultUpdateChannelName;
720724
return defaultUpdateChannelName;
721725
}
722726

0 commit comments

Comments
 (0)