Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • G gajim-plugins
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 52
    • Issues 52
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gajimgajim
  • gajim-plugins
  • Merge requests
  • !207

New plugin: Stickers

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Alexander requested to merge PapaTutuWawa/gajim-plugins:feat/stickers-plugin into master Dec 27, 2020
  • Overview 62
  • Commits 37
  • Pipelines 11
  • Changes 15

This plugin implements XEP-0449 and allows the user to send and receive stickers. Sticker packs that are not published on the user's account can be uploaded and published on sign-in, if configured. The same holds true for stickers that are published on the user's account but not locally present, except that they are downloaded on sign-in. Animated stickers, though currently only GIFs, are also supported with the ability to turn off animations.

stickers_chat

The button that shows a menu for selecting the sticker to send is also searchable and updates when a new sticker pack gets added. It searches for matchin in either a sticker's "description" (desc) or one of its "suggests".

stickers_popup

When a sticker is not known, the sticker pack gets automatically downloaded and added. This, however, can be turned off. In that case, a button is shown that asks the user if the sticker pack should be downloaded.

stickers_manual

As just deleting the folder containing the sticker pack does not delete it from the account, this plugin also features a UI for removing sticker packs:

stickers_list

There are, however, currently two problems:

  • The stickers are always sent unencrypted. At least with OMEMO, all non-whitelisted tags are filtered out before sending.
  • As a rework of the conversation view is currently in progress, I would have to rewrite the plugin a bit when that MR is merged.

I should note that the plugin does not support importing or creating sticker packs. For my testing purposes I have created a script that takes a JSON representation of a sticker pack - that this plugin uses internally - and updates it so that the plugin can work with it. I feel like it is out of scope of the plugin, or at least of this first MR.

Under Linux the plugin requires stickers to be located at ~/.local/share/gajim/plugins_data/stickers/<sticker pack ID>/<sticker file>. The folder must contain a info.json file that describes the sticker pack and looks like this:

{
  "id": "0c58051a78fcd4ecf982f136",
  "name": "A sticker pack",
  "summary": "A description",
  "stickers": [
    {
      "type": "image/png",
      "hashes": [
        {
          "algo": "sha-256",
          "value": "8b76e01a4cd9ef8b3d63541459b1718b62c6073271b4e14cd0a9d3155964f13b"
        }
      ],
      "size": "14015",
      "dimension": "113x110",
      "desc": ":grin:",
      "suggests": [":blobgrin:"],
      "filename": "grin.png",
      "url": ""
    },
    [...]
  ]
}

The URL attribute of a sticker can be left empty as the plugin updates it automatically when the sticker pack has been published.

I tested this plugin on two Linux machines and it works. It requires a Gajim version newer than a290db02.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feat/stickers-plugin