UBERF-8876 Clear account cache on contact transaction (#7431)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2024-12-11 20:42:39 +07:00
committed by GitHub
parent 224d003d64
commit 962f3816b9
+6 -1
View File
@@ -24,6 +24,7 @@ import core, {
TxApplyIf,
TxCUD,
TxOperations,
TxProcessor,
TxWorkspaceEvent,
WithLookup,
WorkspaceEvent,
@@ -824,12 +825,16 @@ export class GithubWorker implements IntegrationManager {
// Handle tx
const h = this._client.getHierarchy()
for (const t of tx) {
if (h.isDerived(t._class, core.class.TxCUD)) {
if (TxProcessor.isExtendsCUD(t._class)) {
const cud = t as TxCUD<Doc>
if (cud.objectClass === github.class.DocSyncInfo) {
this.triggerSync()
break
}
if (cud.objectClass === contact.class.Person || cud.objectClass === contact.class.Channel) {
this.accountMap.clear()
break
}
}
if (h.isDerived(t._class, core.class.TxApplyIf)) {
const applyop = t as TxApplyIf