Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slack import: is message threading implemented? #10203

Closed
ftc2 opened this issue Jan 29, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@ftc2
Copy link

commented Jan 29, 2019

Summary

Threaded messages imported from slack do not appear as threads/replies.

Steps to reproduce

Mattermost Version: 5.7.0
Database Schema Version: 5.7.0
Database: postgres

sudo /opt/mattermost/bin/mattermost import slack TEAM_NAME /path/to/slack_export.zip

This export contained ~130k messages and ~60 users, and it was done on a fresh mattermost installation.

Expected behavior

Some messages in the slack export were threaded. After importing into mattermost, they should still be visible in a threaded context.

Observed behavior (that appears unintentional)

After importing into mattermost, the messages are visible. However, their thread context is lost. They just look like normal messages and not replies.

Possible fixes

Message threading is obviously supported in mattermost. Are threads from slack just not implemented in the importer, or is this a bug? Thanks

@ftc2

This comment has been minimized.

Copy link
Author

commented Jan 29, 2019

type SlackPost struct {
User string `json:"user"`
BotId string `json:"bot_id"`
BotUsername string `json:"username"`
Text string `json:"text"`
TimeStamp string `json:"ts"`
Type string `json:"type"`
SubType string `json:"subtype"`
Comment *SlackComment `json:"comment"`
Upload bool `json:"upload"`
File *SlackFile `json:"file"`
Attachments []*model.SlackAttachment `json:"attachments"`
}

actually, i don't see thread_ts in there, so i'm guessing it's not implemented.

i think it would be really nice to have...

https://api.slack.com/docs/message-threading

@amyblais

This comment has been minimized.

Copy link
Member

commented Jan 30, 2019

Hi @ftc2,

Yes I believe that importing threads is not supported yet. Please contribute this in the feature idea forum so it can be discussed, upvoted and considered for a help wanted ticket. If you submit a feature request, please include a link back to this GitHub issue. If you're interested in implementing, please say so and we'll prioritize the review.

@ftc2

This comment has been minimized.

Copy link
Author

commented Feb 8, 2019

thank you. i made a uservoice suggestion for it:
https://mattermost.uservoice.com/forums/306457-general/suggestions/36721660-implement-threads-in-slack-import-tool

in slack, replies are standalone objects. it works via a thread_ts (thread timestamp) attribute. thread_ts refers to the ts (timestamp) of the parent post. if a post has thread_ts == ts, then it is the beginning of a thread.

possible approach:
import all posts except for ones where thread_ts != ts (as these are replies to other posts). once that's done, go back and import the replies since their parents will have already been imported.

@amyblais

This comment has been minimized.

Copy link
Member

commented Feb 8, 2019

Thank you for opening the feature request! If you're interested in implementing any of these features, please feel free to open a pull request and/or ask any questions.

@amyblais amyblais closed this Feb 8, 2019

matshch added a commit to matshch/mattermost-server that referenced this issue Apr 26, 2019

Add support for threads import from Slack (fixes mattermost#10203)
Also add remainders to thread in long message handling and fix file handling.

matshch added a commit to matshch/mattermost-server that referenced this issue Apr 26, 2019

crspeller added a commit that referenced this issue May 9, 2019

Add support for threads import from Slack (fixes #10203) (#10732)
Also add remainders to thread in long message handling and fix file handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.