From 736b6f1d12e26292a3d2c40bad8334753823ab1e Mon Sep 17 00:00:00 2001 From: blackst0ne Date: Mon, 5 Nov 2018 11:24:26 +1100 Subject: [PATCH] Update discord notification service --- app/models/project_services/discord_service.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/models/project_services/discord_service.rb b/app/models/project_services/discord_service.rb index ffd82afc131..3718af3a6e6 100644 --- a/app/models/project_services/discord_service.rb +++ b/app/models/project_services/discord_service.rb @@ -19,7 +19,7 @@ class DiscordService < ChatNotificationService "This service sends notifications about projects events to Discord channels.
To set up this service:
    -
  1. Setup a custom Incoming Webhook.
  2. +
  3. Setup a custom Incoming Webhook.
  4. Paste the Webhook URL into the field below.
  5. Select events below to enable notifications.
" @@ -30,9 +30,11 @@ class DiscordService < ChatNotificationService end def event_field(event) + # No-op. end def default_channel_placeholder + # No-op. end def default_fields @@ -47,13 +49,9 @@ class DiscordService < ChatNotificationService def notify(message, opts) client = Discordrb::Webhooks::Client.new(url: webhook) + client.execute do |builder| builder.content = message.pretext - # builder.add_embed do |embed| - # embed.title = 'Embed title' - # embed.description = 'Embed description' - # embed.timestamp = Time.now - # end end end