FIX: Use correct identifier in transcript thread hint (#115)

We were using the internal UID of the channel in the hint, which would then fail to match any 'channel' configs in Discourse (which use the human-friendly `#channel` format). This was causing automatic threading for transcripts to fail.
This commit is contained in:
David Taylor 2022-03-21 16:03:23 +00:00 committed by GitHub
parent cd5387c567
commit d63477fec0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ module DiscourseChatIntegration::Provider::SlackProvider
end end
if not @requested_thread_ts.nil? if not @requested_thread_ts.nil?
post_content << "<!--SLACK_CHANNEL_ID=#{@channel_id};SLACK_TS=#{@requested_thread_ts}-->" post_content << "<!--SLACK_CHANNEL_ID=#{@channel_name};SLACK_TS=#{@requested_thread_ts}-->"
end end
post_content post_content

View File

@ -198,7 +198,7 @@ RSpec.describe DiscourseChatIntegration::Provider::SlackProvider::SlackTranscrip
it 'includes slack thread identifiers in body' do it 'includes slack thread identifiers in body' do
text = thread_transcript.build_transcript text = thread_transcript.build_transcript
expect(text).to include("<!--SLACK_CHANNEL_ID=G1234;SLACK_TS=1501801629.052212-->") expect(text).to include("<!--SLACK_CHANNEL_ID=#general;SLACK_TS=1501801629.052212-->")
end end
end end