mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-07 09:47:35 +08:00
fix
This commit is contained in:
@@ -45,6 +45,13 @@ func (c *BaseChannel) IsRunning() bool {
|
||||
return c.running.Load()
|
||||
}
|
||||
|
||||
func (c *BaseChannel) HealthCheck(ctx context.Context) error {
|
||||
if !c.IsRunning() {
|
||||
return fmt.Errorf("%s channel not running", c.name)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *BaseChannel) IsAllowed(senderID string) bool {
|
||||
if len(c.allowList) == 0 {
|
||||
return true
|
||||
|
||||
@@ -295,7 +295,7 @@ func (m *Manager) GetStatus() map[string]interface{} {
|
||||
defer m.mu.RUnlock()
|
||||
|
||||
status := make(map[string]interface{})
|
||||
for name, channel := range m.channels {
|
||||
for name := range m.channels {
|
||||
status[name] = map[string]interface{}{}
|
||||
}
|
||||
return status
|
||||
|
||||
Reference in New Issue
Block a user