mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-18 04:33:09 +02:00
delete pollVote notification
This commit is contained in:
parent
49f3090edd
commit
2e2ed1385f
8 changed files with 37 additions and 72 deletions
|
@ -30,6 +30,7 @@ You should also include the user name that made the change.
|
|||
|
||||
#### For users
|
||||
- ノートのウォッチ機能が削除されました
|
||||
- アンケートに投票された際に通知が作成されなくなりました
|
||||
- 新たに動的なPagesを作ることはできなくなりました
|
||||
- 代わりにAiScriptを用いてより柔軟に動的なコンテンツを作成できるMisskey Play機能が実装されています。
|
||||
- AiScriptが0.12.2にアップデートされました
|
||||
|
|
|
@ -1550,7 +1550,6 @@ _notification:
|
|||
youGotReply: "{name}からのリプライ"
|
||||
youGotQuote: "{name}による引用"
|
||||
youRenoted: "{name}がRenoteしました"
|
||||
youGotPoll: "{name}が投票しました"
|
||||
youGotMessagingMessageFromUser: "{name}からのチャットがあります"
|
||||
youGotMessagingMessageFromGroup: "{name}のチャットがあります"
|
||||
youWereFollowed: "フォローされました"
|
||||
|
@ -1569,7 +1568,6 @@ _notification:
|
|||
renote: "Renote"
|
||||
quote: "引用"
|
||||
reaction: "リアクション"
|
||||
pollVote: "アンケートに投票された"
|
||||
pollEnded: "アンケートが終了"
|
||||
receiveFollowRequest: "フォロー申請を受け取った"
|
||||
followRequestAccepted: "フォローが受理された"
|
||||
|
|
|
@ -92,13 +92,6 @@ export class PollService {
|
|||
choice: choice,
|
||||
userId: user.id,
|
||||
});
|
||||
|
||||
// Notify
|
||||
this.createNotificationService.createNotification(note.userId, 'pollVote', {
|
||||
notifierId: user.id,
|
||||
noteId: note.id,
|
||||
choice: choice,
|
||||
});
|
||||
}
|
||||
|
||||
@bindThis
|
||||
|
|
|
@ -98,7 +98,7 @@ export class NotificationEntityService implements OnModuleInit {
|
|||
}),
|
||||
reaction: notification.reaction,
|
||||
} : {}),
|
||||
...(notification.type === 'pollVote' ? {
|
||||
...(notification.type === 'pollVote' ? { // TODO: そのうち消す
|
||||
note: this.noteEntityService.pack(notification.note ?? notification.noteId!, { id: notification.notifieeId }, {
|
||||
detail: true,
|
||||
_hint_: options._hintForEachNotes_,
|
||||
|
|
|
@ -55,11 +55,11 @@ export class Notification {
|
|||
* 通知の種類。
|
||||
* follow - フォローされた
|
||||
* mention - 投稿で自分が言及された
|
||||
* reply - (自分または自分がWatchしている)投稿が返信された
|
||||
* renote - (自分または自分がWatchしている)投稿がRenoteされた
|
||||
* quote - (自分または自分がWatchしている)投稿が引用Renoteされた
|
||||
* reaction - (自分または自分がWatchしている)投稿にリアクションされた
|
||||
* pollVote - (自分または自分がWatchしている)投稿のアンケートに投票された
|
||||
* reply - 投稿に返信された
|
||||
* renote - 投稿がRenoteされた
|
||||
* quote - 投稿が引用Renoteされた
|
||||
* reaction - 投稿にリアクションされた
|
||||
* pollVote - 投稿のアンケートに投票された (廃止)
|
||||
* pollEnded - 自分のアンケートもしくは自分が投票したアンケートが終了した
|
||||
* receiveFollowRequest - フォローリクエストされた
|
||||
* followRequestAccepted - 自分の送ったフォローリクエストが承認された
|
||||
|
|
|
@ -162,13 +162,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
userId: me.id,
|
||||
});
|
||||
|
||||
// Notify
|
||||
this.createNotificationService.createNotification(note.userId, 'pollVote', {
|
||||
notifierId: me.id,
|
||||
noteId: note.id,
|
||||
choice: ps.choice,
|
||||
});
|
||||
|
||||
// リモート投票の場合リプライ送信
|
||||
if (note.userHost != null) {
|
||||
const pollOwner = await this.usersRepository.findOneByOrFail({ id: note.userId }) as IRemoteUser;
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
<i v-else-if="notification.type === 'reply'" class="ti ti-arrow-back-up"></i>
|
||||
<i v-else-if="notification.type === 'mention'" class="ti ti-at"></i>
|
||||
<i v-else-if="notification.type === 'quote'" class="ti ti-quote"></i>
|
||||
<i v-else-if="notification.type === 'pollVote'" class="ti ti-chart-arrows"></i>
|
||||
<i v-else-if="notification.type === 'pollEnded'" class="ti ti-chart-arrows"></i>
|
||||
<!-- notification.reaction が null になることはまずないが、ここでoptional chaining使うと一部ブラウザで刺さるので念の為 -->
|
||||
<XReactionIcon
|
||||
|
@ -51,11 +50,6 @@
|
|||
<MkA v-if="notification.type === 'quote'" class="text" :to="notePage(notification.note)" :title="getNoteSummary(notification.note)">
|
||||
<Mfm :text="getNoteSummary(notification.note)" :plain="true" :nowrap="!full"/>
|
||||
</MkA>
|
||||
<MkA v-if="notification.type === 'pollVote'" class="text" :to="notePage(notification.note)" :title="getNoteSummary(notification.note)">
|
||||
<i class="ti ti-quote"></i>
|
||||
<Mfm :text="getNoteSummary(notification.note)" :plain="true" :nowrap="!full"/>
|
||||
<i class="ti ti-quote"></i>
|
||||
</MkA>
|
||||
<MkA v-if="notification.type === 'pollEnded'" class="text" :to="notePage(notification.note)" :title="getNoteSummary(notification.note)">
|
||||
<i class="ti ti-quote"></i>
|
||||
<Mfm :text="getNoteSummary(notification.note)" :plain="true" :nowrap="!full"/>
|
||||
|
@ -239,12 +233,6 @@ useTooltip(reactionRef, (showing) => {
|
|||
pointer-events: none;
|
||||
}
|
||||
|
||||
&.pollVote {
|
||||
padding: 3px;
|
||||
background: #88a6b7;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&.pollEnded {
|
||||
padding: 3px;
|
||||
background: #88a6b7;
|
||||
|
|
|
@ -51,8 +51,8 @@ async function composeNotification<K extends keyof pushNotificationDataMap>(data
|
|||
actions: userDetail.isFollowing ? [] : [
|
||||
{
|
||||
action: 'follow',
|
||||
title: t('_notification._actions.followBack')
|
||||
}
|
||||
title: t('_notification._actions.followBack'),
|
||||
},
|
||||
],
|
||||
}];
|
||||
}
|
||||
|
@ -66,8 +66,8 @@ async function composeNotification<K extends keyof pushNotificationDataMap>(data
|
|||
actions: [
|
||||
{
|
||||
action: 'reply',
|
||||
title: t('_notification._actions.reply')
|
||||
}
|
||||
title: t('_notification._actions.reply'),
|
||||
},
|
||||
],
|
||||
}];
|
||||
|
||||
|
@ -80,8 +80,8 @@ async function composeNotification<K extends keyof pushNotificationDataMap>(data
|
|||
actions: [
|
||||
{
|
||||
action: 'reply',
|
||||
title: t('_notification._actions.reply')
|
||||
}
|
||||
title: t('_notification._actions.reply'),
|
||||
},
|
||||
],
|
||||
}];
|
||||
|
||||
|
@ -94,8 +94,8 @@ async function composeNotification<K extends keyof pushNotificationDataMap>(data
|
|||
actions: [
|
||||
{
|
||||
action: 'showUser',
|
||||
title: getUserName(data.body.user)
|
||||
}
|
||||
title: getUserName(data.body.user),
|
||||
},
|
||||
],
|
||||
}];
|
||||
|
||||
|
@ -108,14 +108,14 @@ async function composeNotification<K extends keyof pushNotificationDataMap>(data
|
|||
actions: [
|
||||
{
|
||||
action: 'reply',
|
||||
title: t('_notification._actions.reply')
|
||||
title: t('_notification._actions.reply'),
|
||||
},
|
||||
...((data.body.note.visibility === 'public' || data.body.note.visibility === 'home') ? [
|
||||
{
|
||||
action: 'renote',
|
||||
title: t('_notification._actions.renote')
|
||||
}
|
||||
] : [])
|
||||
{
|
||||
action: 'renote',
|
||||
title: t('_notification._actions.renote'),
|
||||
},
|
||||
] : []),
|
||||
],
|
||||
}];
|
||||
|
||||
|
@ -141,7 +141,7 @@ async function composeNotification<K extends keyof pushNotificationDataMap>(data
|
|||
const dummy = `${encodeURIComponent(`${u.host}${u.pathname}`)}.png`;
|
||||
badge = `${origin}/proxy/${dummy}?${url.query({
|
||||
url: u.href,
|
||||
badge: '1'
|
||||
badge: '1',
|
||||
})}`;
|
||||
}
|
||||
}
|
||||
|
@ -162,20 +162,12 @@ async function composeNotification<K extends keyof pushNotificationDataMap>(data
|
|||
actions: [
|
||||
{
|
||||
action: 'showUser',
|
||||
title: getUserName(data.body.user)
|
||||
}
|
||||
title: getUserName(data.body.user),
|
||||
},
|
||||
],
|
||||
}];
|
||||
}
|
||||
|
||||
case 'pollVote':
|
||||
return [t('_notification.youGotPoll', { name: getUserName(data.body.user) }), {
|
||||
body: data.body.note.text || '',
|
||||
icon: data.body.user.avatarUrl,
|
||||
badge: iconUrl('poll-h'),
|
||||
data,
|
||||
}];
|
||||
|
||||
case 'pollEnded':
|
||||
return [t('_notification.pollEnded'), {
|
||||
body: data.body.note.text || '',
|
||||
|
@ -192,12 +184,12 @@ async function composeNotification<K extends keyof pushNotificationDataMap>(data
|
|||
actions: [
|
||||
{
|
||||
action: 'accept',
|
||||
title: t('accept')
|
||||
title: t('accept'),
|
||||
},
|
||||
{
|
||||
action: 'reject',
|
||||
title: t('reject')
|
||||
}
|
||||
title: t('reject'),
|
||||
},
|
||||
],
|
||||
}];
|
||||
|
||||
|
@ -217,21 +209,21 @@ async function composeNotification<K extends keyof pushNotificationDataMap>(data
|
|||
actions: [
|
||||
{
|
||||
action: 'accept',
|
||||
title: t('accept')
|
||||
title: t('accept'),
|
||||
},
|
||||
{
|
||||
action: 'reject',
|
||||
title: t('reject')
|
||||
}
|
||||
title: t('reject'),
|
||||
},
|
||||
],
|
||||
}];
|
||||
|
||||
case 'app':
|
||||
return [data.body.header || data.body.body, {
|
||||
body: data.body.header && data.body.body,
|
||||
icon: data.body.icon,
|
||||
data
|
||||
}];
|
||||
return [data.body.header || data.body.body, {
|
||||
body: data.body.header && data.body.body,
|
||||
icon: data.body.icon,
|
||||
data,
|
||||
}];
|
||||
|
||||
default:
|
||||
return null;
|
||||
|
@ -279,7 +271,7 @@ export async function createEmptyNotification() {
|
|||
silent: true,
|
||||
badge: iconUrl('null'),
|
||||
tag: 'read_notification',
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
res();
|
||||
|
@ -288,7 +280,7 @@ export async function createEmptyNotification() {
|
|||
for (const n of
|
||||
[
|
||||
...(await self.registration.getNotifications({ tag: 'user_visible_auto_notification' })),
|
||||
...(await self.registration.getNotifications({ tag: 'read_notification' }))
|
||||
...(await self.registration.getNotifications({ tag: 'read_notification' })),
|
||||
]
|
||||
) {
|
||||
n.close();
|
||||
|
|
Loading…
Reference in a new issue