feat(channels): add send_progress option to control progress message delivery
Add a boolean config option `channels.sendProgress` (default: false) to control whether progress messages (marked with `_progress` metadata) are sent to chat channels. When disabled, progress messages are filtered out in the outbound dispatcher.
This commit is contained in:
@@ -193,6 +193,9 @@ class ChannelManager:
|
|||||||
timeout=1.0
|
timeout=1.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if msg.metadata.get("_progress") and not self.config.channels.send_progress:
|
||||||
|
continue
|
||||||
|
|
||||||
channel = self.channels.get(msg.channel)
|
channel = self.channels.get(msg.channel)
|
||||||
if channel:
|
if channel:
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ class QQConfig(Base):
|
|||||||
class ChannelsConfig(Base):
|
class ChannelsConfig(Base):
|
||||||
"""Configuration for chat channels."""
|
"""Configuration for chat channels."""
|
||||||
|
|
||||||
|
send_progress: bool = False
|
||||||
whatsapp: WhatsAppConfig = Field(default_factory=WhatsAppConfig)
|
whatsapp: WhatsAppConfig = Field(default_factory=WhatsAppConfig)
|
||||||
telegram: TelegramConfig = Field(default_factory=TelegramConfig)
|
telegram: TelegramConfig = Field(default_factory=TelegramConfig)
|
||||||
discord: DiscordConfig = Field(default_factory=DiscordConfig)
|
discord: DiscordConfig = Field(default_factory=DiscordConfig)
|
||||||
|
|||||||
Reference in New Issue
Block a user