Add importCompleted notification. Send importCompleted when antenna/customEmoji/muting/userList is imported

The only userImportableEntities that don't notify
are blocking and following because they fork off a batch of single

Closes #891
This commit is contained in:
наб 2025-07-14 18:52:13 +02:00
parent 69f3c8a58e
commit a00a3c6841
No known key found for this signature in database
GPG key ID: BCFD0B018D2658F1
14 changed files with 104 additions and 7 deletions

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { notificationTypes, userExportableEntities } from '@/types.js';
import { notificationTypes, userExportableEntities, userImportableEntities } from '@/types.js';
const baseSchema = {
type: 'object',
@ -334,6 +334,26 @@ export const packedNotificationSchema = {
format: 'id',
},
},
}, {
type: 'object',
properties: {
...baseSchema.properties,
type: {
type: 'string',
optional: false, nullable: false,
enum: ['importCompleted'],
},
importedEntity: {
type: 'string',
optional: false, nullable: false,
enum: userImportableEntities,
},
fileId: {
type: 'string',
optional: false, nullable: false,
format: 'id',
},
},
}, {
type: 'object',
properties: {