Slack threads and chat integration plugin transcripts

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?

2개의 좋아요

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).

1개의 좋아요

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:

9개의 좋아요

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
}
1개의 좋아요

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

To close the loop here - @mbugowski kindly contributed a pull request to fix the issue:

https://github.com/discourse/discourse-chat-integration/commit/1a08d647857b356bdd39810bde76bc90de978337

@tony612 if you update to the latest version it should now work.

5개의 좋아요

이제 Slack 스레드에서 슬래시 명령이 작동합니다! 아래를 확인해 주세요 :backhand_index_pointing_down:t3:

스레드 내에서 기록(transcript)을 게시하는 슬래시 명령에 대한 지원도 볼 수 있을까요? :crossed_fingers:t3:

6개의 좋아요

정말 이 말이 사실이었으면 좋겠습니다. 그러면 제 일이 훨씬 편해질 테니까요. 하지만 Slack API 문서에는 관련 내용이 전혀 보이지 않습니다. 혹시 giphy에 특별하게 알파 테스트 권한을 준 건 아닐까요? 혹시 제가 못 보는 문서를 보고 계신 건가요?

아마도 추가 정보일 수 있습니다: 오늘 회사에서 한 사용자가 스레드에서 /giphy를 사용할 수 없다고 불평하며, Slack이 스레드에서는 지원하지 않는다고 알려주는 화면을 캡처해서 올렸습니다. 그런데 같은 스레드에서 다른 사용자는 /giphy를 성공적으로 사용했습니다. 여기서 A/B 테스트가 진행되고 있는 것 같습니다.

1개의 좋아요

좋은 소식입니다! 플러그인에 Slack의 “Shortcuts” API를 지원하도록 변경 사항을 병합했습니다. 이제 스레드에서 …를 클릭하고 "Post to Discourse"를 누르면 Discourse로 바로 이동하는 버튼이 표시됩니다. 이제 슬래시 명령어나 스레드 영구 링크를 다룰 필요가 없습니다!

이 기능을 사용하려면 최신 버전의 chat-integration이 필요하며, 설정의 이 새로운 단계를 통해 Slack 앱을 수정해야 합니다.

항상처럼 피드백이 있다면 알려주세요 :slight_smile:

cc @mcwumbly @galligan @mcdanlj

9개의 좋아요

:star_struck::star_struck::star_struck:

놀랍네요!

방금 이 기능을 추가하려고 시도했는데, 불행히도 다음과 같은 오류가 발생했습니다.

Error: unable to fetch channel history from Slack

가장 최근의 Slack 메시지에 대해 이 작업을 시도해 보았습니다.

이 토픽의 모든 설정 지침을 따르셨나요? 특히 봇에 필요한 모든 스코프를 부여하셨나요?

문제를 찾았어요! 채팅 통합 앱(Chat Integration App)이 제가 게시하려고 했던 채널에 포함되어 있지 않았거든요. 앱을 해당 채널에 초대하자 전사본을 게시할 수 있었습니다. 감사합니다.

  • 현재 및 향후 새로 생성되는 모든 Slack 채널에 채팅 통합 앱을 자동으로 추가할 수 있을까요?

  • 모든 Discourse 사이트가 자신을 'Discourse’라고 부르는 것은 아니므로, UX 관점에서 “Continue on Discourse” 버튼의 텍스트를 "Create Transcript"나 단축키 이름(기본값은 "Post to Discourse"이지만 변경 가능)과 유사한 것으로 바꾸는 것이 더 적절할 것 같습니다.

2개의 좋아요

아쉽게도 불가능하다고 생각하지만, 제 생각이 틀렸으면 좋겠습니다. 여기에 대한 오류 메시지를 개선하여 봇을 채널에 추가하는 방법에 대한 안내를 제공하도록 살펴보겠습니다.

:+1: 좋은 지적입니다. 기본적으로 'Discourse’라는 단어를 제거하도록 기본값을 업데이트할 수 있습니다. 하지만 그 사이에, 관리자 패널에서 "Continue on Discourse"를 검색하여 원하는 텍스트로 변경할 수 있습니다: Customize text in Discourse

수정: 기본 버튼 텍스트가 이제 포럼에서 계속입니다.

4개의 좋아요

Slack 스레드에 설명된 모든 단계를 따랐습니다. 거기에 설명된 모든 스코프를 추가했고(추가적인 스코프도 몇 개 더 넣었습니다), 관련 채널에 앱을 초대했습니다.

문제는 1%의 경우에만 작동하는 것 같다는 겁니다. 여기 보세요:

하지만 공개 채널에서는 99%의 경우 "Error: unable to fetch users from Slack"이라는 오류가 발생합니다:

그리고 DM에서는 “Error: unable to fetch channel history from Slack” 오류가 나요.

1개의 좋아요