feat: update auto reply and packaging
This commit is contained in:
@@ -121,6 +121,7 @@ type AutoReplyEngine struct {
|
||||
humanPending map[string]*humanAssistPending
|
||||
collaborations map[string]*collaborationSession
|
||||
autoSent map[string]time.Time
|
||||
materialSent map[string]time.Time
|
||||
records []AutoReplyRecord
|
||||
nextRecordID int64
|
||||
status AutoReplyStatus
|
||||
@@ -177,6 +178,7 @@ func initAutoReplyEngine() {
|
||||
humanPending: make(map[string]*humanAssistPending),
|
||||
collaborations: make(map[string]*collaborationSession),
|
||||
autoSent: make(map[string]time.Time),
|
||||
materialSent: make(map[string]time.Time),
|
||||
status: AutoReplyStatus{
|
||||
Enabled: cfg.Enabled,
|
||||
Running: cfg.Enabled,
|
||||
@@ -318,6 +320,19 @@ func (e *AutoReplyEngine) setLastErrorWithScope(scope string, msg string) {
|
||||
}
|
||||
}
|
||||
|
||||
func (e *AutoReplyEngine) clearLastErrorScope(scope string) {
|
||||
scope = normalizeAutoReplyErrorScope(scope)
|
||||
if scope == "" {
|
||||
return
|
||||
}
|
||||
e.mu.Lock()
|
||||
if e.status.LastErrorScope == scope {
|
||||
e.status.LastError = ""
|
||||
e.status.LastErrorScope = ""
|
||||
}
|
||||
e.mu.Unlock()
|
||||
}
|
||||
|
||||
func normalizeAutoReplyErrorScope(scope string) string {
|
||||
switch strings.TrimSpace(scope) {
|
||||
case autoReplyErrorScopeListen:
|
||||
|
||||
Reference in New Issue
Block a user