diff --git a/packages/plugins/@nocobase/plugin-data-source-main/src/server/server.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/server.ts index bcd7320ab2..ab61bee1e5 100644 --- a/packages/plugins/@nocobase/plugin-data-source-main/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-data-source-main/src/server/server.ts @@ -41,7 +41,7 @@ export class PluginDataSourceMainServer extends Plugin { this.loadFilter = filter; } - async onSync(message) { + async handleSyncMessage(message) { const { type, collectionName } = message; if (type === 'newCollection') { const collectionModel: CollectionModel = await this.app.db.getCollection('collections').repository.findOne({ @@ -92,7 +92,7 @@ export class PluginDataSourceMainServer extends Plugin { transaction, }); - this.app.syncManager.publish(this.name, { + this.sendSyncMessage({ type: 'newCollection', collectionName: model.get('name'), });