Cloud collaborator refactoring (#6424)

This commit is contained in:
Alexander Onnikov
2024-08-29 15:10:37 +07:00
committed by GitHub
parent 42b19c39c7
commit 4ff8a4559f
52 changed files with 762 additions and 998 deletions
@@ -372,16 +372,7 @@ export abstract class IssueSyncManagerBase {
!areEqualMarkups(update.description, syncData.current?.description ?? '')
) {
try {
const versionId = `${Date.now()}`
issueData.description = await this.collaborator.updateContent(
doc.description,
{ description: update.description },
{
versionId,
versionName: versionId,
createdBy: account
}
)
await this.collaborator.updateContent(doc.description, { description: update.description })
} catch (err: any) {
Analytics.handleError(err)
this.ctx.error(err)
@@ -926,17 +917,8 @@ export abstract class IssueSyncManagerBase {
workspace: this.provider.getWorkspaceId().name
})
try {
const versionId = `${Date.now()}`
issueData.description = update.description
update.description = await this.collaborator.updateContent(
existingIssue.description,
{ description: update.description },
{
versionId,
versionName: versionId,
createdBy: account
}
)
await this.collaborator.updateContent(existingIssue.description, { description: update.description })
} catch (err: any) {
Analytics.handleError(err)
this.ctx.error('error during description update', err)