Skip to content

feat(chat): Send stickers from a sticker packs folder - #20020

Open
sarumaj wants to merge 1 commit into
nextcloud:mainfrom
sarumaj:feat/8786/sticker-packs
Open

sarumaj wants to merge 1 commit into
nextcloud:mainfrom
sarumaj:feat/8786/sticker-packs

Conversation

@sarumaj

@sarumaj sarumaj commented Oct 27, 2026

Copy link
Copy Markdown

β˜‘οΈ Resolves

@nickvergessen asked me, if I could contribute the code base from the app for my family to your code base.

What it does:

  1. An admin points Talk at a folder, for example occ config:app:set spreed stickers_folder --value Stickers. Until then, no one gets stickers. The path is resolved in each user's own files, so a team folder or a shared folder named Stickers works too

  2. Each subfolder is one sticker pack, and the subfolder's name is then the tab name. Images lying directly in the top folder form a pack of their own. Only PNG, JPEG, GIF and WebP files get in. SVG is skipped because of possible code injection. Files the user isn't allowed to share are skipped too.

  3. New endpoint GET /ocs/v2.php/apps/spreed/api/v1/stickers returns the packs, and for each sticker its file id, name, path, mimetype and etag. Mobile apps could use the same endpoint to build their own picker later. This is in implemented lib/Service/StickerService.php and lib/Controller/StickerController.php.

  4. A stickers entry is in the features list, plus config => chat => stickers-folder in the settings.

  5. A sticker button sits to the right of the message box. It opens a popup with one tab per pack and a grid of previews. A click sends the sticker and closes the popover. The packs are fetched each time the popover opens. The button is hidden in federated conversations, for guests and while editing a message.

  6. Sending uses Talk's existing "share from Files". The problem is that a file can be shared with a conversation only once. On a repeat send, Talk posts the message again anyway but answers the request with a 403, so the web client treats that 403 as sent (maybe you can find a fix for it?).

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

πŸ–ŒοΈ UI Checklist

πŸ–ΌοΈ Screenshots / Screencasts

🏚️ Before 🏑 After
pr-before pr-after

🚧 Tasks

  • Admin settings UI for the stickers folder (now occ config:app:set spreed stickers_folder --value Stickers only)
  • Design review of the picker and the button's placement

🏁 Checklist

  • 🌏 Tested with different browsers / clients:
    • Chromium (Chrome / Edge / Opera / Brave)
    • Firefox
    • Safari
    • Talk Desktop
    • Integrations with Files sidebar and other apps
    • Not risky to browser differences / client
  • πŸ–ŒοΈ Design was reviewed, approved or inspired by the design team
  • ⛑️ Tests are included or not possible
  • πŸ“— User documentation in https://github.com/nextcloud/documentation/tree/master/user_manual/talk has been updated or is not required

πŸ› οΈ API Checklist

🚧 Tasks

  • Integration tests (Behat) for GET /api/v1/stickers

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • πŸ“˜ API documentation in docs/ has been updated or is not required
  • πŸ”– Capability is added or not needed

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Dawid Ciepiela <dawid@ciepiela.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement feature: chat πŸ’¬ Chat and system messages feature: upload & shares & voice πŸ“€πŸŽ™οΈ Sharing files into a chat and audio recordings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants