From 962f3816b9c9fd323bd2cb5e86256d1f11138d68 Mon Sep 17 00:00:00 2001 From: Alexander Onnikov Date: Wed, 11 Dec 2024 20:42:39 +0700 Subject: [PATCH] UBERF-8876 Clear account cache on contact transaction (#7431) Signed-off-by: Alexander Onnikov --- services/github/pod-github/src/worker.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/services/github/pod-github/src/worker.ts b/services/github/pod-github/src/worker.ts index 3f36636908..45e168a622 100644 --- a/services/github/pod-github/src/worker.ts +++ b/services/github/pod-github/src/worker.ts @@ -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 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