Merge branch 'truncate-push-notification' into swn

This commit is contained in:
tamaina
2021-12-25 01:38:21 +09:00
18 changed files with 181 additions and 164 deletions

View File

@@ -4,6 +4,7 @@ block vars
- const user = note.user;
- const title = user.name ? `${user.name} (@${user.username})` : `@${user.username}`;
- const url = `${config.url}/notes/${note.id}`;
- const isRenote = note.renote && note.text == null && note.fileIds.length == 0 && note.poll == null;
block title
= `${title} | ${instanceName}`
@@ -19,7 +20,7 @@ block og
meta(property='og:image' content= user.avatarUrl)
block meta
if user.host || profile.noCrawle
if user.host || isRenote || profile.noCrawle
meta(name='robots' content='noindex')
meta(name='misskey:user-username' content=user.username)

View File

@@ -16,7 +16,7 @@ type pushNotificationsTypes = {
};
// プッシュメッセージサーバーには文字数制限があるため、内容を削減します
function truncateNotification(notification: Packed<'Notification'>): Packed<'Notification'> {
function truncateNotification(notification: Packed<'Notification'>): any {
if (notification.note) {
return {
...notification,