diff --git a/lib/discourse_chat/provider/flowdock/flowdock_provider.rb b/lib/discourse_chat/provider/flowdock/flowdock_provider.rb index de0b626..765eb4d 100644 --- a/lib/discourse_chat/provider/flowdock/flowdock_provider.rb +++ b/lib/discourse_chat/provider/flowdock/flowdock_provider.rb @@ -30,11 +30,11 @@ module DiscourseChat::Provider::FlowdockProvider message = { flow_token: flow_token, event: "discussion", - author: { - name: display_name, + author: { + name: display_name, avatar: post.user.small_avatar_url - }, - title: I18n.t("chat_integration.provider.flowdock.message_title"), + }, + title: I18n.t("chat_integration.provider.flowdock.message_title"), external_thread_id: post.topic.id, body: post.excerpt(SiteSetting.chat_integration_flowdock_excerpt_length, text_entities: true, strip_links: false, remap_emoji: true), thread: { @@ -56,4 +56,4 @@ module DiscourseChat::Provider::FlowdockProvider raise ::DiscourseChat::ProviderError.new info: { error_key: error_key, message: message, response_body: response.body } end end -end +end diff --git a/spec/lib/discourse_chat/provider/flowdock/flowdock_provider_spec.rb b/spec/lib/discourse_chat/provider/flowdock/flowdock_provider_spec.rb index b9cdccc..fbba268 100644 --- a/spec/lib/discourse_chat/provider/flowdock/flowdock_provider_spec.rb +++ b/spec/lib/discourse_chat/provider/flowdock/flowdock_provider_spec.rb @@ -8,7 +8,7 @@ RSpec.describe DiscourseChat::Provider::FlowdockProvider do SiteSetting.chat_integration_flowdock_enabled = true end - let(:chan1) { DiscourseChat::Channel.create!(provider: 'flowdock', data: { flow_token: '5d1fe04cf66e078d6a2b579ddb8a465b'}) } + let(:chan1) { DiscourseChat::Channel.create!(provider: 'flowdock', data: { flow_token: '5d1fe04cf66e078d6a2b579ddb8a465b' }) } it 'sends a request' do stub1 = stub_request(:post, "https://api.flowdock.com/messages").to_return(status: 200)