2026-02-20 15:25:44 +00:00
|
|
|
//go:build !amd64 && !arm64 && !riscv64 && !mips64 && !ppc64
|
|
|
|
|
|
|
|
|
|
package feishu
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
"errors"
|
|
|
|
|
|
|
|
|
|
"github.com/sipeed/picoclaw/pkg/bus"
|
|
|
|
|
"github.com/sipeed/picoclaw/pkg/channels"
|
|
|
|
|
"github.com/sipeed/picoclaw/pkg/config"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// FeishuChannel is a stub implementation for 32-bit architectures
|
|
|
|
|
type FeishuChannel struct {
|
|
|
|
|
*channels.BaseChannel
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-02 17:27:39 +00:00
|
|
|
var errUnsupported = errors.New("feishu channel is not supported on 32-bit architectures")
|
|
|
|
|
|
2026-02-20 15:25:44 +00:00
|
|
|
// NewFeishuChannel returns an error on 32-bit architectures where the Feishu SDK is not supported
|
|
|
|
|
func NewFeishuChannel(cfg config.FeishuConfig, bus *bus.MessageBus) (*FeishuChannel, error) {
|
2026-02-22 13:57:12 +00:00
|
|
|
return nil, errors.New(
|
|
|
|
|
"feishu channel is not supported on 32-bit architectures (armv7l, 386, etc.). Please use a 64-bit system or disable feishu in your config",
|
|
|
|
|
)
|
2026-02-20 15:25:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Start is a stub method to satisfy the Channel interface
|
|
|
|
|
func (c *FeishuChannel) Start(ctx context.Context) error {
|
2026-03-02 17:27:39 +00:00
|
|
|
return errUnsupported
|
2026-02-20 15:25:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Stop is a stub method to satisfy the Channel interface
|
|
|
|
|
func (c *FeishuChannel) Stop(ctx context.Context) error {
|
2026-03-02 17:27:39 +00:00
|
|
|
return errUnsupported
|
2026-02-20 15:25:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Send is a stub method to satisfy the Channel interface
|
|
|
|
|
func (c *FeishuChannel) Send(ctx context.Context, msg bus.OutboundMessage) error {
|
2026-03-02 17:27:39 +00:00
|
|
|
return errUnsupported
|
2026-02-20 15:25:44 +00:00
|
|
|
}
|
feat(feishu): enhance channel with markdown cards, media, mentions, and editing
Upgrade the Feishu channel from basic text-only to full feature parity with
Telegram/Discord: interactive card messages with markdown rendering, message
editing (MessageEditor), placeholder messages (PlaceholderCapable), emoji
reactions (ReactionCapable), and inbound/outbound media support (MediaSender).
Also add @mention detection with lazy bot open_id discovery, group trigger
filtering with mention awareness, and multi-type inbound message parsing
(text, post, image, file, audio, video).
2026-03-02 16:49:11 +00:00
|
|
|
|
|
|
|
|
// EditMessage is a stub method to satisfy MessageEditor
|
|
|
|
|
func (c *FeishuChannel) EditMessage(ctx context.Context, chatID, messageID, content string) error {
|
2026-03-02 17:27:39 +00:00
|
|
|
return errUnsupported
|
feat(feishu): enhance channel with markdown cards, media, mentions, and editing
Upgrade the Feishu channel from basic text-only to full feature parity with
Telegram/Discord: interactive card messages with markdown rendering, message
editing (MessageEditor), placeholder messages (PlaceholderCapable), emoji
reactions (ReactionCapable), and inbound/outbound media support (MediaSender).
Also add @mention detection with lazy bot open_id discovery, group trigger
filtering with mention awareness, and multi-type inbound message parsing
(text, post, image, file, audio, video).
2026-03-02 16:49:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SendPlaceholder is a stub method to satisfy PlaceholderCapable
|
|
|
|
|
func (c *FeishuChannel) SendPlaceholder(ctx context.Context, chatID string) (string, error) {
|
2026-03-02 17:27:39 +00:00
|
|
|
return "", errUnsupported
|
feat(feishu): enhance channel with markdown cards, media, mentions, and editing
Upgrade the Feishu channel from basic text-only to full feature parity with
Telegram/Discord: interactive card messages with markdown rendering, message
editing (MessageEditor), placeholder messages (PlaceholderCapable), emoji
reactions (ReactionCapable), and inbound/outbound media support (MediaSender).
Also add @mention detection with lazy bot open_id discovery, group trigger
filtering with mention awareness, and multi-type inbound message parsing
(text, post, image, file, audio, video).
2026-03-02 16:49:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ReactToMessage is a stub method to satisfy ReactionCapable
|
|
|
|
|
func (c *FeishuChannel) ReactToMessage(ctx context.Context, chatID, messageID string) (func(), error) {
|
2026-03-02 17:27:39 +00:00
|
|
|
return func() {}, errUnsupported
|
feat(feishu): enhance channel with markdown cards, media, mentions, and editing
Upgrade the Feishu channel from basic text-only to full feature parity with
Telegram/Discord: interactive card messages with markdown rendering, message
editing (MessageEditor), placeholder messages (PlaceholderCapable), emoji
reactions (ReactionCapable), and inbound/outbound media support (MediaSender).
Also add @mention detection with lazy bot open_id discovery, group trigger
filtering with mention awareness, and multi-type inbound message parsing
(text, post, image, file, audio, video).
2026-03-02 16:49:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SendMedia is a stub method to satisfy MediaSender
|
|
|
|
|
func (c *FeishuChannel) SendMedia(ctx context.Context, msg bus.OutboundMediaMessage) error {
|
2026-03-02 17:27:39 +00:00
|
|
|
return errUnsupported
|
feat(feishu): enhance channel with markdown cards, media, mentions, and editing
Upgrade the Feishu channel from basic text-only to full feature parity with
Telegram/Discord: interactive card messages with markdown rendering, message
editing (MessageEditor), placeholder messages (PlaceholderCapable), emoji
reactions (ReactionCapable), and inbound/outbound media support (MediaSender).
Also add @mention detection with lazy bot open_id discovery, group trigger
filtering with mention awareness, and multi-type inbound message parsing
(text, post, image, file, audio, video).
2026-03-02 16:49:11 +00:00
|
|
|
}
|