| 37 | const errCodeTenantTokenInvalid = 99991663 |
| 38 | |
| 39 | type FeishuChannel struct { |
| 40 | *channels.BaseChannel |
| 41 | bc *config.Channel |
| 42 | config *config.FeishuSettings |
| 43 | client *lark.Client |
| 44 | wsClient *larkws.Client |
| 45 | tokenCache *tokenCache // custom cache that supports invalidation |
| 46 | |
| 47 | botOpenID atomic.Value // stores string; populated lazily for @mention detection |
| 48 | messageCache sync.Map // caches fetched messages (messageID -> *larkim.Message) |
| 49 | |
| 50 | mu sync.Mutex |
| 51 | cancel context.CancelFunc |
| 52 | |
| 53 | progress *channels.ToolFeedbackAnimator |
| 54 | deleteMessageFn func(context.Context, string, string) error |
| 55 | sendMediaPartFn func(context.Context, string, bus.MediaPart, media.MediaStore) error |
| 56 | sendTextFn func(context.Context, string, string) (string, error) |
| 57 | } |
| 58 | |
| 59 | type cachedMessage struct { |
| 60 | msg *larkim.Message |
nothing calls this directly
no outgoing calls
no test coverage detected