fix issue with AI unable to load from local storage if redis not enabled
This commit is contained in:
parent
969d98adfe
commit
4aedf5823e
1 changed files with 6 additions and 2 deletions
|
|
@ -302,7 +302,7 @@ namespace SecondBotEvents.Services
|
|||
// are we using redis?
|
||||
if (RedisLive() == false)
|
||||
{
|
||||
return null;
|
||||
return new List<KeyValuePair<string, string>>();
|
||||
}
|
||||
// is redis enabled for this message type?
|
||||
if ((myConfig.GetRedisImchat() == true) && (avatarchat == true))
|
||||
|
|
@ -321,7 +321,7 @@ namespace SecondBotEvents.Services
|
|||
return ReadChatFromRedis(store);
|
||||
}
|
||||
// Redis is not enabled for this message type, use local storage
|
||||
return null;
|
||||
return new List<KeyValuePair<string, string>>();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -399,6 +399,10 @@ namespace SecondBotEvents.Services
|
|||
return history;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
history = chatHistoryAI[store];
|
||||
}
|
||||
return history;
|
||||
}
|
||||
return history;
|
||||
|
|
|
|||
Loading…
Reference in a new issue