Slack thread replies invisible when polling (self-hosted/local dev only)

未关闭
#23 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
58/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
backend

调研方向

The bug is in the Slack polling fallback: lib/slack/poller.ts calls only conversations.history, which omits plain in-thread replies. Find where the poller collects messages and where getTicketByThreadId is used, then read Slack's conversations.replies behaviour for parent messages with reply_count > 0. Done means a plain thread reply on an existing ticket is appended when polling, without duplicating messages already handled by the webhook path.

由索引模型根据 Issue 内容生成。

描述

backend bug help wanted

Copied from DeadantCo/answerLoops#13 · originally opened by sethr07 on 2026-11-20

Copied from https://github.com/answerLoops/answerLoops/issues/17 — originally opened by @NathanTarbert on 2026-08-03

What's broken

When AnswerLoops polls Slack (self-hosted deployments without a public URL, orgs on the slack_force_polling override, or anyone running the app locally against a real Slack workspace), a reply posted inside an existing ticket's thread never shows up on the ticket.

Root cause

The poller only calls Slack's conversations.history endpoint. That endpoint only returns top-level channel messages and thread replies explicitly broadcast to the channel (the "Also send to #channel" checkbox when replying in a thread) — by Slack API design, it never returns a plain in-thread reply.

This does not affect the managed cloud service. Production listens via Slack's Events API webhook, which sends a message event for every reply regardless of broadcast status — thread replies already work correctly there. This is specifically a gap in the polling fallback path.

Fix direction

Track thread parents (messages with reply_count > 0 returned by conversations.history) and additionally poll conversations.replies for each active thread, feeding new replies through the same append-to-existing-ticket logic (getTicketByThreadId) the webhook path already uses.

Where

lib/slack/poller.ts

Start here: new to the project? Read CONTRIBUTING.md first. It covers the ground rules, running answerLoops locally, and how to open a pull request.

主要语言
TypeScript
星标
0
派生
0
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DeadantCo/answerLoopsdev 的其他 Issue

查看 DeadantCo/answerLoopsdev 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。