Skip to content

Register the sticker reference provider only if the related task type is available - #391

Merged
julien-nc merged 6 commits into
mainfrom
fix/noid/sticker-picker-only-if-tasktype-available
Nov 7, 2025
Merged

Register the sticker reference provider only if the related task type is available#391
julien-nc merged 6 commits into
mainfrom
fix/noid/sticker-picker-only-if-tasktype-available

Conversation

@julien-nc

@julien-nc julien-nc commented Nov 5, 2025

Copy link
Copy Markdown
Member

It was always registered so the sticker picker could be used even if:

  • the "Enable text-to-sticker in smart picker" admin setting was disabled
  • the "Enable text-to-sticker in smart picker" personal setting was disabled
  • the "Generate sticker" task type was disabled in the AI admin settings

The main fix is

  • Prevent loading the reference script if the "Generate sticker" task type is not available

Additional aspect of the fix for later:

  • Prevent registering the sticker generation reference provider, task type and provider if the "Generate image" task type is not available (disabled in AI admin settings or has no provider). We kind of need taskProcessingManager->getAvailableTaskTypeIds for that (to efficiently check if the task type is available in Application.php) and we still support NC 30-31 which don't have this method.

Please try to test all scenarios in your dev setup:

  • TextToImage not available (because it's disabled or there is no provider installed)
  • TextToStickerTaskType not available because it's disabled
  • "Enable text-to-sticker in smart picker" admin setting disabled
  • "Enable text-to-sticker in smart picker" personal setting disabled

If all of those are enabled/available, the "AI sticker generation" picker should be there in the UI (I use Talk to test).

Additional fixes:

  • Bug in personal settings
  • Do no edit the value automatically when the admin settings are loaded
  • Improve warning messages for picker toggles
  • Make sticker generation tasks fail if image generation is not available
  • Add admin setting warning if sticker generation is enabled while image generation is not available

@janepie

This comment was marked as outdated.

…er and reference provider, rely on the listener to conditionally inject the sticker reference script

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
…tically

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
…eneration is not available

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
…on is enabled while image generation is not available

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc
julien-nc force-pushed the fix/noid/sticker-picker-only-if-tasktype-available branch from 5fa031d to a6bdc15 Compare November 5, 2025 16:35
@julien-nc

Copy link
Copy Markdown
Member Author

@janepie I addressed all the topics we discussed.

The initial comment was updated.

@janepie janepie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then let's go 🚀

@lukasdotcom lukasdotcom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I went through all the combinations to test. Looks good 🚀

@julien-nc
julien-nc merged commit 7b76461 into main Nov 7, 2025
17 checks passed
@julien-nc
julien-nc deleted the fix/noid/sticker-picker-only-if-tasktype-available branch November 7, 2025 15:26
@janepie janepie mentioned this pull request Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants