stickers support
Riot just added stickers support:
https://medium.com/@RiotChat/stickers-are-here-introducing-riot-im-0-15-for-web-desktop-284c32b93acc
We can provide a basic support for this in fractal, maybe adding another button in the bottom line for integrations.
Design Tasks
-
Design interface to add new stickers group -
Design interface to send stickers to the room
Development Tasks
-
implement the api needed -
implement the interface to add stickers group -
implement the interface to send stickers to the room
QA Tasks
-
Test that stickers group are listed -
Test that we can add/remove stickers groups -
Test that we can send an sticker
Protocol spec
https://github.com/matrix-org/matrix-doc/issues/1236
There's no official documentation for this so we need to investigate to know how to do this. For integrations we need to talk to the scalar.vector.im server and this is what I've found that Riot web does for stickers:
scalar.vector.im register scalar.vector.im
POST https://scalar.vector.im/api/register -> scalar_token
access_token fiibjEKTNOTXUrBhlrAqBnAj
expires_in 3600
matrix_server_name matrix.org
token_type Bearer
List stickers
GET https://scalar.vector.im/api/widgets/assets?widget_type=m.stickerpicker&scalar_token=136e979f779cc9bfbebe7d1a9d7665865a5e08ea
Add an sticker group
GET https://scalar.vector.im/api/widgets/purchase_asset?widget_id=faf418e3-7002-4907-8093-781643aae82e&widget_type=m.stickerpicker&asset_type=stickman&scalar_token=3ae890b5079d398f10e0d42cb58651df06e1c8b6
Get my stickers
https://scalar.vector.im/api/widgets/assets?widget_type=m.stickerpicker&widget_id=faf418e3-7002-4907-8093-781643aae82e&filter_unpurchased=true
Sent event:
{
"origin_server_ts": 1526641314211,
"sender": "@unicode:matrix.org",
"event_id": "$15266413142367505GWuzS:matrix.org",
"unsigned": {
"age": 1074,
"transaction_id": "m1526641255019.0"
},
"content": {
"body": "A hastily-rendered stick figure stands with arms in the air beneath three blue-and-white juggling balls apparently in motion. We cannot tell whether the figure is juggling competently or has simply thrown all three balls into the air and is awaiting the inevitable. The figure's mouth is formed into an enigmatic 'o'.",
"info": {
"mimetype": "image/png",
"thumbnail_info": {
"mimetype": "image/png",
"h": 200,
"w": 88,
"size": 30170
},
"h": 200,
"thumbnail_url": "mxc://matrix.org/mQEotjwsEKeZivqIfZjxNfgC",
"w": 88,
"size": 30170
},
"url": "mxc://matrix.org/mQEotjwsEKeZivqIfZjxNfgC"
},
"type": "m.sticker",
"room_id": "!sGOkpwYmpDsHcrwVwG:matrix.org"
}