drop messaging (#9919)

* drop messaging (from backend)

* wip
This commit is contained in:
syuilo 2023-02-15 13:06:06 +09:00 committed by GitHub
parent d0aba46ee3
commit 8f2049bcd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 18 additions and 3292 deletions

View file

@ -11,15 +11,12 @@ import { bindThis } from '@/decorators.js';
// Defined also packages/sw/types.ts#L13
type pushNotificationsTypes = {
'notification': Packed<'Notification'>;
'unreadMessagingMessage': Packed<'MessagingMessage'>;
'unreadAntennaNote': {
antenna: { id: string, name: string };
note: Packed<'Note'>;
};
'readNotifications': { notificationIds: string[] };
'readAllNotifications': undefined;
'readAllMessagingMessages': undefined;
'readAllMessagingMessagesOfARoom': { userId: string } | { groupId: string };
'readAntenna': { antennaId: string };
'readAllAntennas': undefined;
};
@ -40,11 +37,10 @@ function truncateBody<T extends keyof pushNotificationsTypes>(type: T, body: pus
reply: undefined,
renote: undefined,
user: type === 'notification' ? undefined as any : body.note.user,
}
},
} : {}),
};
return body;
}
@Injectable()
@ -81,8 +77,6 @@ export class PushNotificationService {
if ([
'readNotifications',
'readAllNotifications',
'readAllMessagingMessages',
'readAllMessagingMessagesOfARoom',
'readAntenna',
'readAllAntennas',
].includes(type) && !subscription.sendReadMessage) continue;