mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-29 07:18:08 +09:00
fix: Detach push notifications..
..from "isRead" check. Apps will handle that theself.
This commit is contained in:
parent
c6d432b2d2
commit
f950c33f79
@ -80,6 +80,9 @@ export async function createNotification(
|
|||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
const fresh = await Notifications.findOneBy({ id: notification.id });
|
const fresh = await Notifications.findOneBy({ id: notification.id });
|
||||||
if (fresh == null) return; // 既に削除されているかもしれない
|
if (fresh == null) return; // 既に削除されているかもしれない
|
||||||
|
// We execute this before, because the server side "read" check doesnt work well with push notifications, the app and service worker will decide themself
|
||||||
|
// when it is best to show push notifications
|
||||||
|
pushNotification(notifieeId, "notification", packed);
|
||||||
if (fresh.isRead) return;
|
if (fresh.isRead) return;
|
||||||
|
|
||||||
//#region ただしミュートしているユーザーからの通知なら無視
|
//#region ただしミュートしているユーザーからの通知なら無視
|
||||||
@ -95,7 +98,6 @@ export async function createNotification(
|
|||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
publishMainStream(notifieeId, "unreadNotification", packed);
|
publishMainStream(notifieeId, "unreadNotification", packed);
|
||||||
pushNotification(notifieeId, "notification", packed);
|
|
||||||
|
|
||||||
if (type === "follow")
|
if (type === "follow")
|
||||||
sendEmailNotification.follow(
|
sendEmailNotification.follow(
|
||||||
|
Loading…
Reference in New Issue
Block a user