`dump` omits bot messages from threads, including a bot-posted root
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
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
- Pick a thread whose root or replies were posted by a bot or a workflow.
- 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
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rusq/slackdump
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 64/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Support PostgreSQL as an archive backendPossibly taken @yunwei37 claimed this 72 days ago. Openenhancement
Difficulty 5/5 Over a week Newbie friendliness 42/100
-
ai-assisted
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nebari-dev/nebi#630 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
router-for-me/CLIProxyAPI#7084 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
speakeasy-api/openapi#284 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
yetone/magpie#4095 · 1 comment ·
Maintainers usually reply within 1 day