Slack threads and chat integration plugin transcripts


(David Taylor) #21

For ‘Private Channels’ you need to add the groups:history scope. For “Direct Messages” you need to add the im:history scope. You will need to ‘reinstall’ the app for changes to scopes to take effect (Slack’s UI should have prompted you to do this).

Are you seeing anything at /logs when the errors occur?


(Dave McClure) #22

I tried adding these scopes, and reinstalling:

groups:history
im:history
mpim:history

Still getting that 422, but don’t see anything obvious in the Discourse logs in the admin panel (this is a hosted instance, so I don’t have direct access to other logs).


(Dave McClure) #23

I used the /discourse post command from a public channel to great effect… but threads are now more common in many channels than main channel conversations, so still hopeful that some day this will work in a thread…

Update: w00t! just tried it again and it worked!

/discourse post https://ourdomain.slack.com/archives/C0591LA4X/p1529529151000359?thread_ts=1529528304.000177&cid=C0592LA4X

as did:

/discourse post thread https://ourdomain.slack.com/archives/C0592LA4X/p1529528304000177

Another update: I was also able to post a thread from a private channel. :tada:


(Tony Han) #24

I got an error when using post transcript in a public channel:

{
	"message": "Job exception: undefined method `[]' for nil:NilClass\n",
	"progname": null,
	"severity": 3,
	"backtrace": "/var/www/discourse/plugins/discourse-chat-integration/lib/discourse_chat/provider/slack/slack_message.rb:38:in `block in text'\n/var/www/discourse/plugins/discourse-chat-integration/lib/discourse_chat/provider/slack/slack_message.rb:30:in `gsub'\n/var/www/discourse/plugins/discourse-chat-integration/lib/discourse_chat/provider/slack/slack_message.rb:30:in `text'\n/var/www/discourse/plugins/discourse-chat-integration/lib/discourse_chat/provider/slack/slack_message.rb:62:in `processed_text_with_attachments'\n/var/www/discourse/plugins/discourse-chat-integration/lib/discourse_chat/provider/slack/slack_transcript.rb:155:in `block in build_slack_ui'\n/var/www/discourse/plugins/discourse-chat-integration/lib/discourse_chat/provider/slack/slack_transcript.rb:155:in `map'\n/var/www/discourse/plugins/discourse-chat-integration/lib/discourse_chat/provider/slack/slack_transcript.rb:155:in `build_slack_ui'\n/var/www/discourse/plugins/discourse-chat-integration/lib/discourse_chat/provider/slack/slack_command_controller.rb:95:in `block in process_post_request'\n/var/www/discourse/lib/scheduler/defer.rb:70:in `block in do_work'\n/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rails_multisite-2.0.4/lib/rails_multisite/connection_management.rb:63:in `with_connection'\n/var/www/discourse/lib/scheduler/defer.rb:68:in `do_work'\n/var/www/discourse/lib/scheduler/defer.rb:59:in `block (2 levels) in start_thread'",
	"count": 9,
	"env": {
		"message": "Running deferred code 'Processing slack transcript request'"
	},
	"protected": false
}

(Mateusz Bugowski) #26

Hello, did you managed to fix this? I have the same one.