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

Aperta
#23 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DeadantCo/answerLoopsdev

Tutte le issue di DeadantCo/answerLoopsdev

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.