enhance(sw): 푸시 알림 개선

This commit is contained in:
NoriDev 2023-12-19 17:33:19 +09:00
parent bba8243d80
commit 371d539858
22 changed files with 8 additions and 43 deletions

View file

@ -75,6 +75,9 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE
### Server
- Enhance: (dev) 개발 모드에서 locale 및 유형 정의가 자동으로 재생성됨 (misskey-dev/misskey#12481)
- Enhance: 푸시 알림 개선
- 개인간 대화 알림을 받았을 때, 대화 내용을 푸시 알림에 표시
- 그룹간 대화 알림을 받았을 때, 채팅을 보낸 사용자와 내용을 표시
---

View file

@ -1516,8 +1516,6 @@ _notification:
youGotReply: "ردّ عليك {name}"
youGotQuote: "اقتبس {name} منشورك"
youRenoted: "أعاد {name} نشر منشورك"
youGotMessagingMessageFromUser: "لقد تلقيت رسالة مِن {name}"
youGotMessagingMessageFromGroup: "لقد أرسِلَت رسالة إلى الفريق {name}"
youWereFollowed: "يتابعك"
youReceivedFollowRequest: "تلقيتَ طلب متابعة"
yourFollowRequestAccepted: "قُبل طلب المتابعة"

View file

@ -1380,8 +1380,6 @@ _notification:
youGotReply: "{name} আপনাকে জবাব দিয়েছে"
youGotQuote: "{name} আপনাকে উদ্ধৃত করেছে"
youRenoted: "{name} এর Renote"
youGotMessagingMessageFromUser: "{name} আপনাকে মেসেজ করেছে"
youGotMessagingMessageFromGroup: "{name} গ্রুপে একটি নতুন মেসেজ আছে"
youWereFollowed: "আপনাকে অনুসরণ করছে"
youReceivedFollowRequest: "অনুসরণ করার জন্য অনুরোধ পাওয়া গেছে"
yourFollowRequestAccepted: "আপনার অনুসরণ করার অনুরোধ গৃহীত হয়েছে"

View file

@ -2155,8 +2155,6 @@ _notification:
youGotReply: "{name} hat dir geantwortet"
youGotQuote: "{name} hat dich zitiert"
youRenoted: "Renote deiner Notiz von {name}"
youGotMessagingMessageFromUser: "{name} hat dir eine Chatnachricht gesendet"
youGotMessagingMessageFromGroup: "In die Gruppe {name} wurde eine Chatnachricht gesendet"
youWereFollowed: "ist dir gefolgt"
youReceivedFollowRequest: "Du hast eine Follow-Anfrage erhalten"
yourFollowRequestAccepted: "Deine Follow-Anfrage wurde akzeptiert"

View file

@ -2452,8 +2452,6 @@ _notification:
youGotReply: "{name} replied to you"
youGotQuote: "{name} quoted you"
youRenoted: "Renote from {name}"
youGotMessagingMessageFromUser: "{name} sent you a chat message"
youGotMessagingMessageFromGroup: "A chat message was sent to the {name} group"
youWereFollowed: "followed you"
youReceivedFollowRequest: "You've received a follow request"
yourFollowRequestAccepted: "Your follow request was accepted"

View file

@ -2173,8 +2173,6 @@ _notification:
youGotReply: "Respuesta de {name}"
youGotQuote: "Citado por {name}"
youRenoted: "Renotado por {name}"
youGotMessagingMessageFromUser: "{name} comenzó un chat contigo"
youGotMessagingMessageFromGroup: "Tienes un chat de {name}"
youWereFollowed: "te ha seguido"
youReceivedFollowRequest: "Has mandado una solicitud de seguimiento"
yourFollowRequestAccepted: "Tu solicitud de seguimiento fue aceptada"

View file

@ -1969,8 +1969,6 @@ _notification:
youGotReply: "Réponse de {name}"
youGotQuote: "Cité·e par {name}"
youRenoted: "{name} vous a Renoté"
youGotMessagingMessageFromUser: "{name} vous envoyé un message"
youGotMessagingMessageFromGroup: "Un message a été envoyé au groupe {name}"
youWereFollowed: "s'est abonné·e à vous"
youReceivedFollowRequest: "Vous avez reçu une demande dabonnement"
yourFollowRequestAccepted: "Votre demande dabonnement a été accepté"

View file

@ -2146,8 +2146,6 @@ _notification:
youGotReply: "{name} membalas kamu"
youGotQuote: "{name} mengutip kamu"
youRenoted: "{name} me-renote kamu"
youGotMessagingMessageFromUser: "{name} mengirimi kamu pesan"
youGotMessagingMessageFromGroup: "Sebuah pesan telah dikirim ke grup {name}"
youWereFollowed: "Mengikuti kamu"
youReceivedFollowRequest: "Kamu menerima permintaan mengikuti"
yourFollowRequestAccepted: "Permintaan mengikuti kamu telah diterima"

2
locales/index.d.ts vendored
View file

@ -2635,8 +2635,6 @@ export interface Locale {
"youGotReply": string;
"youGotQuote": string;
"youRenoted": string;
"youGotMessagingMessageFromUser": string;
"youGotMessagingMessageFromGroup": string;
"youWereFollowed": string;
"youReceivedFollowRequest": string;
"yourFollowRequestAccepted": string;

View file

@ -2239,8 +2239,6 @@ _notification:
youGotReply: "{name} ti ha risposto"
youGotQuote: "{name} ha citato la tua Nota e ha detto"
youRenoted: "{name} ha rinotato"
youGotMessagingMessageFromUser: "{name} ti ha mandato un messaggio"
youGotMessagingMessageFromGroup: "{name} ti ha mandato un messaggio nella chat"
youWereFollowed: "Adesso ti segue"
youReceivedFollowRequest: "Hai ricevuto una richiesta di follow"
yourFollowRequestAccepted: "La tua richiesta di follow è stata accettata"

View file

@ -2533,8 +2533,6 @@ _notification:
youGotReply: "{name}からのリプライ"
youGotQuote: "{name}による引用"
youRenoted: "{name}がRenoteしました"
youGotMessagingMessageFromUser: "{name}からのチャットがあります"
youGotMessagingMessageFromGroup: "{name}のチャットがあります"
youWereFollowed: "フォローされました"
youReceivedFollowRequest: "フォローリクエストが来ました"
yourFollowRequestAccepted: "フォローリクエストが承認されました"

View file

@ -2239,8 +2239,6 @@ _notification:
youGotReply: "{name}からのリプライ"
youGotQuote: "{name}による引用"
youRenoted: "{name}がリノートしたみたいやで"
youGotMessagingMessageFromUser: "{name}からのチャットがあるで"
youGotMessagingMessageFromGroup: "{name}のチャットがあるで"
youWereFollowed: "フォローされたで"
youReceivedFollowRequest: "フォロー許可してほしいみたいやな"
yourFollowRequestAccepted: "フォローさせてもろたで"

View file

@ -2453,8 +2453,6 @@ _notification:
youGotReply: "{name} 님이 답글을 달았어요!"
youGotQuote: "{name} 님이 인용했어요!"
youRenoted: "{name} 님이 리노트했어요!"
youGotMessagingMessageFromUser: "{name} 님이 보낸 채팅이 있어요!"
youGotMessagingMessageFromGroup: "{name}에서 보낸 채팅이 있어요!"
youWereFollowed: "새로운 팔로워가 있어요!"
youReceivedFollowRequest: "새로운 팔로우 요청이 있어요!"
yourFollowRequestAccepted: "팔로우 요청이 수락됐어요!"

View file

@ -1412,8 +1412,6 @@ _notification:
youGotReply: "{name} odpowiedział(a) Tobie"
youGotQuote: "{name} zacytował(a) Ciebie"
youRenoted: "{name} udostępnił(a) Twój wpis"
youGotMessagingMessageFromUser: "{name} wysłał(a) Ci wiadomość"
youGotMessagingMessageFromGroup: "Została wysłana wiadomość do grupy {name}"
youWereFollowed: "Zaobserwował(a) Cię"
youReceivedFollowRequest: "Otrzymałeś(-aś) prośbę o możliwość obserwacji"
yourFollowRequestAccepted: "Twoja prośba o możliwość obserwacji została przyjęta"

View file

@ -1977,8 +1977,6 @@ _notification:
youGotReply: "{name} отвечает вам."
youGotQuote: "{name} цитирует вас."
youRenoted: "{name} передаёт вашу заметку."
youGotMessagingMessageFromUser: "{name} пишет вам."
youGotMessagingMessageFromGroup: "Новое сообщение в группе «{name}»."
youWereFollowed: "У вас новый подписчик."
youReceivedFollowRequest: "У вас новый запрос на подписку."
yourFollowRequestAccepted: "Ваш запрос на подписку одобрен."

View file

@ -1473,8 +1473,6 @@ _notification:
youGotReply: "{name} vám odpovedal/a"
youGotQuote: "{name} vás citoval/a"
youRenoted: "{name} preposlal/a vašu poznámku"
youGotMessagingMessageFromUser: "{name} vám poslal/a správu"
youGotMessagingMessageFromGroup: "Prišla správa do skupiny {name}"
youWereFollowed: "Máte nového sledujúceho"
youReceivedFollowRequest: "Dostali ste žiadosť o sledovanie"
yourFollowRequestAccepted: "Vaša žiadosť o sledovanie bola prijatá"

View file

@ -2139,8 +2139,6 @@ _notification:
youGotReply: "{name} ตอบกลับถึงคุณ"
youGotQuote: "{name} อ้างถึงคุณ"
youRenoted: "รีโน้ตจาก {name}"
youGotMessagingMessageFromUser: "{name} ได้ส่งข้อความแชทถึงคุณ"
youGotMessagingMessageFromGroup: "ข้อความแชทถูกส่งไปยัง {name} กลุ่ม"
youWereFollowed: "ได้ติดตามคุณ"
youReceivedFollowRequest: "คุณมีคำขอติดตามใหม่น่ะ"
yourFollowRequestAccepted: "คำขอติดตามของคุณได้รับการยอมรับแล้วน่ะ"

View file

@ -1643,8 +1643,6 @@ _notification:
youGotReply: "{name} відповідає"
youGotQuote: "{name} цитує вас"
youRenoted: "{name} поширює"
youGotMessagingMessageFromUser: "Повідомлення від {name}"
youGotMessagingMessageFromGroup: "Нове повідомлення в групі {name}"
youWereFollowed: "Новий підписник"
youReceivedFollowRequest: "Ви отримали запит на підписку"
yourFollowRequestAccepted: "Запит на підписку прийнято"

View file

@ -1870,8 +1870,6 @@ _notification:
youGotReply: "{name} trả lời bạn"
youGotQuote: "{name} trích dẫn tút của bạn"
youRenoted: "{name} đăng lại tút của bạn"
youGotMessagingMessageFromUser: "{name} nhắn tin cho bạn"
youGotMessagingMessageFromGroup: "Một tin nhắn trong nhóm {name}"
youWereFollowed: "đã theo dõi bạn"
youReceivedFollowRequest: "Bạn vừa có một yêu cầu theo dõi"
yourFollowRequestAccepted: "Yêu cầu theo dõi của bạn đã được chấp nhận"

View file

@ -2099,8 +2099,6 @@ _notification:
youGotReply: "来自{name}的回复"
youGotQuote: "来自{name}的引用"
youRenoted: "来自{name}的转发"
youGotMessagingMessageFromUser: "来自{name}的聊天"
youGotMessagingMessageFromGroup: "来自{name}的群聊"
youWereFollowed: "关注了你。"
youReceivedFollowRequest: "您有新的关注请求"
yourFollowRequestAccepted: "您的关注请求已通过"

View file

@ -2245,8 +2245,6 @@ _notification:
youGotReply: "{name}回覆了您"
youGotQuote: "{name}引用了您"
youRenoted: "{name} 轉發了你的貼文"
youGotMessagingMessageFromUser: "{name}發送給您的訊息"
youGotMessagingMessageFromGroup: "{name}發送給您的訊息"
youWereFollowed: "您有新的追隨者"
youReceivedFollowRequest: "您有新的追隨請求"
yourFollowRequestAccepted: "您的追隨請求已通過"

View file

@ -254,7 +254,8 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
}
case 'unreadMessagingMessage':
if (data.body.groupId === null) {
return [t('_notification.youGotMessagingMessageFromUser', { name: getUserName(data.body.user) }), {
return [getUserName(data.body.user), {
body: data.body.text ?? '',
icon: data.body.user.avatarUrl,
badge: iconUrl('messages'),
tag: `messaging:user:${data.body.userId}`,
@ -262,7 +263,8 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
renotify: true,
}];
}
return [t('_notification.youGotMessagingMessageFromGroup', { name: data.body.group?.name ?? '' }), {
return [data.body.group?.name ?? '', {
body: `${data.body.user?.username}: ${data.body.text ?? ''}`,
icon: data.body.user.avatarUrl,
badge: iconUrl('messages'),
tag: `messaging:group:${data.body.groupId}`,