mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-05-30 01:30:21 +02:00
Slack Connector to not Index Bots (#581)
This commit is contained in:
parent
b5982c10c3
commit
bb9a18b22c
@ -170,7 +170,15 @@ _DISALLOWED_MSG_SUBTYPES = {
|
||||
|
||||
|
||||
def _default_msg_filter(message: MessageType) -> bool:
|
||||
return message.get("subtype", "") in _DISALLOWED_MSG_SUBTYPES
|
||||
# Don't keep messages from bots
|
||||
if message.get("bot_id") or message.get("app_id"):
|
||||
return True
|
||||
|
||||
# Uninformative
|
||||
if message.get("subtype", "") in _DISALLOWED_MSG_SUBTYPES:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def _filter_channels(
|
||||
|
Loading…
x
Reference in New Issue
Block a user