Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
G
gajim-plugins
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gajim
  • gajim-plugins
  • Merge Requests
  • !207

Open
Opened Dec 27, 2020 by Alexander@PapaTutuWawa
  • Report abuse
Report abuse

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch "https://dev.gajim.org/PapaTutuWawa/gajim-plugins.git" "feat/stickers-plugin"
git checkout -b "PapaTutuWawa/gajim-plugins-feat/stickers-plugin" FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout "master"
git merge --no-ff "PapaTutuWawa/gajim-plugins-feat/stickers-plugin"

Step 4. Push the result of the merge to GitLab

git push origin "master"

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

New plugin: Stickers

  • Overview 57
  • Commits 23
  • Pipelines 9
  • Changes 16

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
None
Milestone
None
Assign milestone
Time tracking
Reference: gajim/gajim-plugins!207
Source branch: feat/stickers-plugin