Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`dump` omits bot messages from threads, including a bot-posted root

Open Beginner friendly
#754 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go, sqlite
Domain
backend, databases

Research direction

Start with threadCond() in internal/chunk/backend/dbase/repository/dbmessage.go and compare its subtype filter with the message recording path in cmd/slackdump/internal/dump/dump.go. Check how the condition handles bot_message and thread_broadcast, then run or add coverage for dumping a thread with bot messages. Done means dump includes the thread messages that archive stores, including bot-posted roots and replies.

Written by the indexing model from the issue text.

Description

Title: dump omits bot messages from threads, including a bot-posted root

Describe the bug
slackdump dump of a thread leaves out every message that has a subtype, such as bot_message. slackdump archive of the same thread keeps them.

In a thread started by a Workflow Builder form, the dump drops the root and the workflow's reply, and keeps only the human reply. Before anyone replied, the same thread dumped as a file with an empty messages array.

The messages are fetched. dump records them in its temporary database (dump.go), then reads the thread back through threadCond() (dbmessage.go). That keeps a message only if its subtype is NULL, or if it's a thread_broadcast and CH.TYPE_ID = 1. The doc comment describes this as "additional filtering of thread_broadcast subtype", but as written it drops every other subtype too.

Authentication type (please read)
Not related to login.

To Reproduce

  1. Pick a thread whose root or replies were posted by a bot or a workflow.
  2. Dump it and archive it, then compare:
d=$(mktemp -d)
url='https://example.slack.com/archives/C0123456789/p1792752291278309'

slackdump dump -files=false -o "$d/dump" "$url"
Slackdump 4.5.2 (commit: Homebrew) built on: 2026-10-24T12:17:07Z
2026-10-27 17:44:30 INFO  dumped sr=<Thread[C0123456789:1792752291.278309]>
2026-10-27 17:44:50 INFO  conversation dump finished
                          ├ output=/tmp/claude-501/tmp.vUnr5fxuWP/dump
                          ├ count=1
                          └ took=21.023959125s
slackdump archive -files=false -o "$d/archive" "$url"
Slackdump 4.5.2 (commit: Homebrew) built on: 2026-10-24T12:17:07Z
2026-10-27 17:44:51 INFO  stream result=<Thread[C0123456789:1792752291.278309]>
2026-10-27 17:45:12 INFO  Recorded workspace data
                          ├ directory=/tmp/claude-501/tmp.vUnr5fxuWP/archive
                          └ took=21.254002375s
# What dump wrote
jq -c '.messages[] | {ts, thread_ts, subtype, username, text: .text[0:60]}' "$d"/dump/*.json
{"ts":"1793116955.460039","thread_ts":"1792752291.278309","subtype":null,"username":null,"text":"<human reply>"}
# What archive stored
sqlite3 -readonly -json "$d/archive/slackdump.sqlite" \
  "SELECT TS AS ts, json_extract(DATA,'$.thread_ts') AS thread_ts, json_extract(DATA,'$.subtype') AS subtype, json_extract(DATA,'$.username') AS username, substr(json_extract(DATA,'$.text'),1,60) AS text FROM MESSAGE ORDER BY TS" \
  | jq -c '.[]'
{"ts":"1792752291.278309","thread_ts":"1792752291.278309","subtype":"bot_message","username":"<workflow name>","text":"<bot root message>"}
{"ts":"1792752299.519359","thread_ts":"1792752291.278309","subtype":"bot_message","username":"<workflow name>","text":"<bot reply>"}
{"ts":"1793116955.460039","thread_ts":"1792752291.278309","subtype":null,"username":null,"text":"<human reply>"}
# Archive rows that pass dump's subtype filter
sqlite3 -readonly -json "$d/archive/slackdump.sqlite" \
  "SELECT TS AS ts, json_extract(DATA,'$.thread_ts') AS thread_ts, json_extract(DATA,'$.subtype') AS subtype, json_extract(DATA,'$.username') AS username, substr(json_extract(DATA,'$.text'),1,60) AS text FROM MESSAGE WHERE json_extract(DATA,'$.subtype') IS NULL ORDER BY TS" \
  | jq -c '.[]'
{"ts":"1793116955.460039","thread_ts":"1792752291.278309","subtype":null,"username":null,"text":"<human reply>"}

Expected behavior
dump writes the same messages that archive stores for the thread, including bot messages.

Output
Shown under each command above.

Desktop (please complete the following information):

  • OS: macOS
  • OS Version: 27.2
  • Slackdump Version: 4.5.2 (Homebrew)

Additional context
I've only seen this with bot_message. Going by the condition, a thread message with any other subtype would be dropped too.

Dominant language
Go
Stars
2.8k
Forks
173
Avg merge
10h 14m
Merged PRs (30d)
9

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rusq/slackdump

All issues in rusq/slackdump

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.