fix(customer): sync conversation name callback
This commit is contained in:
@@ -136,17 +136,15 @@ func (s *customerService) EnsureExternalCustomer(ctx *sqls.TxContext, externalUs
|
|||||||
}
|
}
|
||||||
|
|
||||||
ctx.RegisterCallback(func() {
|
ctx.RegisterCallback(func() {
|
||||||
go func() {
|
if strs.IsNotBlank(externalUser.ExternalName) {
|
||||||
if strs.IsNotBlank(externalUser.ExternalName) {
|
if err := s.syncConversationCustomerName(sqls.DB(), identity.CustomerID, externalUser.ExternalName, nil, now); err != nil {
|
||||||
if err := s.syncConversationCustomerName(sqls.DB(), identity.CustomerID, externalUser.ExternalName, nil, now); err != nil {
|
slog.Error("sync conversation customer name failed",
|
||||||
slog.Error("sync conversation customer name failed",
|
"customerId", identity.CustomerID,
|
||||||
"customerId", identity.CustomerID,
|
"customerName", externalUser.ExternalName,
|
||||||
"customerName", externalUser.ExternalName,
|
"error", err,
|
||||||
"error", err,
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}()
|
}
|
||||||
})
|
})
|
||||||
return identity.CustomerID, nil
|
return identity.CustomerID, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user