mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
feat: add accept invite
This commit is contained in:
@@ -438,6 +438,18 @@ export class DataCenter {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* accept invitation
|
||||
* @param {string} inviteCode
|
||||
*/
|
||||
async acceptInvitation(inviteCode: string, providerStr = 'affine') {
|
||||
const provider = this.providerMap.get(providerStr);
|
||||
if (provider) {
|
||||
return await provider.acceptInvitation(inviteCode);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
onMessage(cb: (message: Message) => void) {
|
||||
return this._messageCenter.onMessage(cb);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user