fix: attempted bugfix for crashing process on invalid spotify access token, refs NOISSUE
This commit is contained in:
		@@ -255,6 +255,7 @@ messageSyncTimer.OnOccurence += async (s, ea) =>
 | 
			
		||||
 | 
			
		||||
// only start interaction timers in production builds
 | 
			
		||||
// for local/development testing we want those disabled
 | 
			
		||||
    likePlaylistCheckTimer.Start();
 | 
			
		||||
if (!app.Environment.IsDevelopment())
 | 
			
		||||
{
 | 
			
		||||
    logger.LogTrace("Starting timer for scheduled processes.");
 | 
			
		||||
@@ -262,7 +263,6 @@ if (!app.Environment.IsDevelopment())
 | 
			
		||||
    userIntroTimer.Start();
 | 
			
		||||
    pickOfTheDayTimer.Start();
 | 
			
		||||
    ldapAssociationTimer.Start();
 | 
			
		||||
    likePlaylistCheckTimer.Start();
 | 
			
		||||
}
 | 
			
		||||
else
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -110,7 +110,7 @@ public class SpotifyApiClient
 | 
			
		||||
 | 
			
		||||
    public async Task<string> GetValidAuthorizationTokenAsync(User user)
 | 
			
		||||
    {
 | 
			
		||||
        if (string.IsNullOrEmpty(user.SpotifyAuthAccessToken))
 | 
			
		||||
        if (string.IsNullOrEmpty(user.SpotifyAuthAccessToken) || string.IsNullOrEmpty(user.SpotifyAuthRefreshToken))
 | 
			
		||||
        {
 | 
			
		||||
            // user either never connected Spotify or we failed to refresh token - user needs to re-authenticate
 | 
			
		||||
            return string.Empty;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user