FIX: persona setting should compare integer value (#1239)

Oversight from recent feature update: https://github.com/discourse/discourse-ai/pull/1234

We should be comparing integer value of setting, otherwise we will never see continue conversation button.
This commit is contained in:
Keegan George 2025-04-01 11:59:06 -07:00 committed by GitHub
parent bf5ccb452c
commit f40e094945
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -156,7 +156,8 @@ export default class AiSearchDiscoveries extends Component {
get canContinueConversation() {
const personas = this.currentUser?.ai_enabled_personas;
const discoverPersona = personas.find(
(persona) => persona.id === this.siteSettings?.ai_bot_discover_persona
(persona) =>
persona.id === parseInt(this.siteSettings?.ai_bot_discover_persona, 10)
);
const discoverPersonaHasBot = discoverPersona?.username;