From 631333ba9e74afb4d0bd69d38e3d3b3dd1481200 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Thu, 29 Feb 2024 18:18:40 +0800 Subject: [PATCH] Cache custom emojis --- public/sw.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/sw.js b/public/sw.js index 03ad471d..3ec33b36 100644 --- a/public/sw.js +++ b/public/sw.js @@ -33,8 +33,9 @@ const imageRoute = new Route( const isRemote = !sameOrigin; const isImage = request.destination === 'image'; const isAvatar = request.url.includes('/avatars/'); + const isCustomEmoji = request.url.includes('/custom/_emojis'); const isEmoji = request.url.includes('/emoji/'); - return isRemote && isImage && (isAvatar || isEmoji); + return isRemote && isImage && (isAvatar || isCustomEmoji || isEmoji); }, new CacheFirst({ cacheName: 'remote-images',