Deduplicate LINE stickers #10

Closed
opened 2021-05-05 02:36:21 -04:00 by fair · 1 comment
Owner

LINE stickers are currently re-downloaded every time they are bridged.

Ideally, the mxid of any bridged sticker should be saved to the media database, which can be reused the next time that sticker is received. This is what is done for sticons (LINE custom emoji) and EmojiOne.

However, unlike the others, stickers aren't identified by a fixed, globally-unique "path"; they're instead just a blob URL, which I think can change. This will make storing them in the DB less effective, as if they can't be uniquely identified, the bridge won't be able to pick the right mxid from the DB, and will re-download the sticker.

Nevertheless, some deduplication is better than none, so the blob URL should be used as a "weak" ID to put in the DB.

LINE stickers are currently re-downloaded every time they are bridged. Ideally, the mxid of any bridged sticker should be saved to the media database, which can be reused the next time that sticker is received. This is what is done for sticons (LINE custom emoji) and EmojiOne. However, unlike the others, stickers aren't identified by a fixed, globally-unique "path"; they're instead just a blob URL, which I think can change. This will make storing them in the DB less effective, as if they can't be uniquely identified, the bridge won't be able to pick the right mxid from the DB, and will re-download the sticker. Nevertheless, some deduplication is better than none, so the blob URL should be used as a "weak" ID to put in the DB.
Author
Owner

Done by 6d646e0.

Done by 6d646e0.
fair closed this issue 2021-06-06 22:19:48 -04:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: fair/matrix-puppeteer-line#10
No description provided.