Skip to content

Commit 746f97a

Browse files
authored
feat(scribe): Scribe will react to ack received messages. (#5672)
1 parent a1ad8fc commit 746f97a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

servers/fai/src/fai/routes/slack_scribe.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
)
2525
from fai.utils.scribe.message_handler import handle_scribe_message
2626
from fai.utils.scribe.validate_github_repo import validate_scribe_github_repo_access
27+
from fai.utils.slack.client import add_reaction
2728
from fai.utils.slack.integration_common import (
2829
SLACK_SCOPES,
2930
cleanup_message_cache,
@@ -106,11 +107,18 @@ async def handle_app_mention(event: dict[str, Any], team_id: str) -> None:
106107
user = event.get("user")
107108
text = event.get("text", "")
108109
channel = event.get("channel")
110+
message_ts = event.get("ts")
109111

110112
LOGGER.info(f"[SCRIBE] App mentioned by {user} in {channel}: {text}")
111113

112114
response = await handle_scribe_message(event, team_id)
113115

116+
if response.bot_token and message_ts and channel:
117+
try:
118+
await add_reaction(channel, message_ts, "eyes", response.bot_token)
119+
except Exception as e:
120+
LOGGER.warning(f"[SCRIBE] Failed to add eyes reaction: {e}")
121+
114122
if not response.response_text or not response.bot_token:
115123
return
116124

0 commit comments

Comments
 (0)