david
(David Taylor)
2018 年5 月 18 日 12:33
21
mcwumbly:
I looked at the diff from the PR and thought perhaps it’d be necessary to add the conversations:history scope to the app on Slack, but I didn’t see that as an option. I tried adding the groups:history scope instead, but that did not seem to work.
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 个赞
mcwumbly
(Dave McClure)
2018 年5 月 18 日 14:04
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).
1 个赞
mcwumbly
(Dave McClure)
2018 年6 月 25 日 14:37
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.
9 个赞
tony612
(Tony Han)
2018 年9 月 26 日 06:49
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
}
1 个赞
mbugowski
(Mateusz Bugowski)
2018 年11 月 9 日 14:24
26
Hello, did you managed to fix this? I have the same one.
david
(David Taylor)
2019 年1 月 4 日 13:52
27
To close the loop here - @mbugowski kindly contributed a pull request to fix the issue:
committed 01:03AM - 14 Dec 18 UTC
@tony612 if you update to the latest version it should now work.
5 个赞
galligan
(Matt Galligan)
2020 年7 月 31 日 15:25
28
斜杠命令现在可以在 Slack 线程中使用了!请看👇🏼
有没有可能支持在某个线程中通过斜杠命令发布转录内容?
6 个赞
mcdanlj
(Michael K Johnson)
2020 年8 月 24 日 17:55
29
我真的很希望这是真的,因为这会让我的生活轻松很多,但在 Slack API 文档中我并没有看到任何相关内容。我想知道他们是否给了 Giphy 特殊的 Alpha 测试访问权限?你有没有看到我所忽略的文档?
可能还有更多信息:今天在工作中,有人在某个线程中抱怨 Slack 不允许在子线程中使用 /giphy,并贴出了一张 Slack 提示该功能在子线程中不受支持的图片;而同一线程中的另一个人却成功使用了 /giphy。看来这里可能正在进行 A/B 测试。
1 个赞
david
(David Taylor)
2021 年4 月 22 日 17:57
30
好消息!我刚刚合并了一项插件更新,增加了对 Slack“快捷方式”(Shortcuts)API 的支持。现在,您可以在主题线程中按下 <kbd>...</kbd>,点击“发布到 Discourse",系统会为您提供一个按钮,直接跳转到 Discourse。再也不用折腾斜杠命令或主题永久链接了!
https://github.com/discourse/discourse-chat-integration/commit/610364ff6d9adbd642c9d201415bbd6da795a036
要启用此功能,您需要最新版本的 chat-integration 插件,并按照以下新步骤修改您的 Slack 应用配置:
david:
前往 <kbd>交互性与快捷方式</kbd> 页面,点击 <kbd>创建新快捷方式</kbd>,选择“在消息上”,然后点击 <kbd>下一步</kbd>。填写以下信息:
名称 :“发布到 Discourse”(可自定义)
简短描述 :“创建转录内容并发布到 Discourse"(可自定义)
回调 ID :post_shortcut(请勿修改)
一如既往,如果您有任何反馈,请随时告诉我们
cc @mcwumbly @galligan @mcdanlj
9 个赞
david
(David Taylor)
2021 年4 月 22 日 19:26
32
您是否已按照此主题 中的所有设置说明进行操作?特别是,您是否已为机器人授予所有必要的权限范围?
david:
用于斜杠命令和转录发布 (如果您不需要此功能,请跳过此部分)
在“权限范围 / 机器人令牌权限范围”下添加以下权限范围:
users:read
channels:history
groups:history
im:history
debryc
(Deborah Chang)
2021 年4 月 22 日 19:40
33
我找到问题了!我们的聊天集成应用不在我尝试发布消息的频道中。将该应用邀请到频道后,我就能成功发布摘要了。谢谢。
2 个赞
david
(David Taylor)
2021 年4 月 22 日 19:48
34
很遗憾,我认为目前还无法实现,但我希望能证明我错了。我会研究一下是否可以改进这里的错误提示,以便提供如何将机器人添加到频道的操作指引。
说得对。我们当然可以更新默认设置,移除“Discourse”这个词。但在此之前,您应该能够在管理面板中搜索“Continue on Discourse”(在 Discourse 上继续),并将其更改为您喜欢的任何内容:Customize text in Discourse
编辑:默认按钮文本现在为 在论坛上继续
4 个赞
我已按照 Slack 线程中描述的所有步骤进行操作。我添加了其中描述的所有范围(甚至添加了额外的范围),并将应用邀请到了相关频道。
问题是,在 1% 的情况下,它似乎有效,请看这里:
但在 99% 的公共频道中,我收到错误:“Error: unable to fetch users from Slack”(错误:无法从 Slack 获取用户)
在私信中:“Error: unable to fetch channel history from Slack”(错误:无法从 Slack 获取频道历史记录)
1 个赞