UI: Prevent Restream OAuth disconnection
Fix the service check for services where its name in the UI does not match its Auth::Def service string. In Restream's case, the service name in the UI and rtmp-services is "Restream.io" while the service name in its Auth::Def is "Restream". This mismatch causes the `service_check` bool to be false, whereas the previous condition (`!!main->auth && service.find(main->auth->service()) != std::string::npos`) would have evaluated to true. This was broken in commit e6f1daab8c64aa4cd57c7615647ad80362d72d72. Fixes GitHub Issue 5290.
This commit is contained in:
parent
7bc06e0db6
commit
10810d9730
@ -686,7 +686,8 @@ void AutoConfigStreamPage::ServiceChanged()
|
||||
|
||||
if (main->auth) {
|
||||
auto system_auth_service = main->auth->service();
|
||||
bool service_check = service == system_auth_service;
|
||||
bool service_check = service.find(system_auth_service) !=
|
||||
std::string::npos;
|
||||
#if YOUTUBE_ENABLED
|
||||
service_check =
|
||||
service_check ? service_check
|
||||
|
@ -481,7 +481,8 @@ void OBSBasicSettings::on_service_currentIndexChanged(int)
|
||||
}
|
||||
|
||||
auto system_auth_service = main->auth->service();
|
||||
bool service_check = service == system_auth_service;
|
||||
bool service_check = service.find(system_auth_service) !=
|
||||
std::string::npos;
|
||||
#if YOUTUBE_ENABLED
|
||||
service_check = service_check ? service_check
|
||||
: IsYouTubeService(system_auth_service) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user