diff --git a/pkg/channels/vk/vk.go b/pkg/channels/vk/vk.go index 37900dbf5..0bc373d18 100644 --- a/pkg/channels/vk/vk.go +++ b/pkg/channels/vk/vk.go @@ -5,7 +5,6 @@ import ( "fmt" "strconv" "strings" - "sync" "github.com/SevereCloud/vksdk/v3/api" "github.com/SevereCloud/vksdk/v3/api/params" @@ -27,7 +26,6 @@ type VKChannel struct { config *config.Config ctx context.Context cancel context.CancelFunc - mu sync.Mutex } func NewVKChannel(cfg *config.Config, bus *bus.MessageBus) (*VKChannel, error) { @@ -244,15 +242,6 @@ func (c *VKChannel) stripBotMention(text string) string { return strings.TrimSpace(text) } -func (c *VKChannel) stripPrefix(text string, prefixes []string) string { - for _, prefix := range prefixes { - if strings.HasPrefix(text, prefix) { - return strings.TrimSpace(strings.TrimPrefix(text, prefix)) - } - } - return text -} - func (c *VKChannel) getUserName(userID int) string { users, err := c.vk.UsersGet(api.Params{ "user_ids": userID, diff --git a/pkg/config/config.go b/pkg/config/config.go index 5f9842779..e169cb91e 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -549,14 +549,14 @@ type IRCConfig struct { } type VKConfig struct { - Enabled bool `json:"enabled" yaml:"-" env:"PICOCLAW_CHANNELS_VK_ENABLED"` - Token SecureString `json:"token,omitzero" yaml:"token,omitempty" env:"PICOCLAW_CHANNELS_VK_TOKEN"` - GroupID int `json:"group_id" yaml:"-" env:"PICOCLAW_CHANNELS_VK_GROUP_ID"` - AllowFrom FlexibleStringSlice `json:"allow_from" yaml:"-" env:"PICOCLAW_CHANNELS_VK_ALLOW_FROM"` + Enabled bool `json:"enabled" yaml:"-" env:"PICOCLAW_CHANNELS_VK_ENABLED"` + Token SecureString `json:"token,omitzero" yaml:"token,omitempty" env:"PICOCLAW_CHANNELS_VK_TOKEN"` + GroupID int `json:"group_id" yaml:"-" env:"PICOCLAW_CHANNELS_VK_GROUP_ID"` + AllowFrom FlexibleStringSlice `json:"allow_from" yaml:"-" env:"PICOCLAW_CHANNELS_VK_ALLOW_FROM"` GroupTrigger GroupTriggerConfig `json:"group_trigger,omitempty" yaml:"-"` - Typing TypingConfig `json:"typing,omitempty" yaml:"-"` + Typing TypingConfig `json:"typing,omitempty" yaml:"-"` Placeholder PlaceholderConfig `json:"placeholder,omitempty" yaml:"-"` - ReasoningChannelID string `json:"reasoning_channel_id" yaml:"-" env:"PICOCLAW_CHANNELS_VK_REASONING_CHANNEL_ID"` + ReasoningChannelID string `json:"reasoning_channel_id" yaml:"-" env:"PICOCLAW_CHANNELS_VK_REASONING_CHANNEL_ID"` } func (c *VKConfig) SetToken(token string) {