feat: update auto reply and packaging
This commit is contained in:
@@ -125,6 +125,10 @@ func (e *AutoReplyEngine) processJob(job AutoReplyJob) {
|
||||
if name := e.displayNameForMessage(msg); name != "" {
|
||||
msg.FromNickName = name
|
||||
}
|
||||
if cfg.Identity.ReplyExternalOnly && identity.isInternal() {
|
||||
e.ignoreMessage(msg, "internal_ignored_external_only")
|
||||
return
|
||||
}
|
||||
if identity.Source == identitySourceUnknownAsCustomer {
|
||||
e.noteReason(identitySourceUnknownAsCustomer)
|
||||
if !msg.IsGroup {
|
||||
@@ -269,7 +273,11 @@ func (e *AutoReplyEngine) processJob(job AutoReplyJob) {
|
||||
}
|
||||
e.setLastRetrievalScores(searchResult.KeywordScore, searchResult.VectorScore, searchResult.RerankScore)
|
||||
if len(materialMatches) > 0 {
|
||||
if err := e.sendMaterials(msg, materialMatches, "materials_replied", withSearchMetadata(currentTimings(), searchResult)); err != nil {
|
||||
materialMatches = e.filterRecentlySentMaterials(msg, materialMatches)
|
||||
}
|
||||
if len(materialMatches) > 0 {
|
||||
tutorialText := materialTutorialTextFromHits(hits)
|
||||
if err := e.sendMaterials(msg, materialMatches, "materials_replied", withSearchMetadata(currentTimings(), searchResult), tutorialText); err != nil {
|
||||
e.setLastErrorWithScope(autoReplyErrorScopeRecords, "material send failed: "+err.Error())
|
||||
}
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user