chore: remove unused function (truncateUnreadAntennaNote)

This commit is contained in:
tamaina 2023-01-04 11:09:05 +00:00
parent 697836c17c
commit e02183bb1b
1 changed files with 0 additions and 20 deletions

View File

@ -47,26 +47,6 @@ function truncateBody<T extends keyof pushNotificationsTypes>(type: T, body: pus
return body; return body;
} }
function truncateUnreadAntennaNote(notification: pushNotificationsTypes['unreadAntennaNote']): pushNotificationsTypes['unreadAntennaNote'] {
if (notification.note) {
return {
...notification,
note: {
...notification.note,
// textをgetNoteSummaryしたものに置き換える
text: getNoteSummary(('type' in notification && notification.type === 'renote') ? notification.note.renote as Packed<'Note'> : notification.note),
cw: undefined,
reply: undefined,
renote: undefined,
user: undefined as any, // 通知を受け取ったユーザーである場合が多いのでこれも捨てる アンテナの場合も不要なのでいらない
},
};
}
return notification;
}
@Injectable() @Injectable()
export class PushNotificationService { export class PushNotificationService {
constructor( constructor(