Add delay to slackbot ping (#1086)
This commit is contained in:
parent
1ae463b708
commit
1d69b56bc2
1 changed files with 1 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
class ApplicationObserver < ActiveRecord::Observer
|
||||
def warned_user_ping(activity)
|
||||
if activity.user.warned == true
|
||||
SlackBot.ping "@#{activity.user.username} just posted.\nThey've been warned since #{activity.user.roles.where(name: 'warned')[0].updated_at.strftime('%d %B %Y')}\nhttps://dev.to#{activity.path}",
|
||||
SlackBot.delay.ping "@#{activity.user.username} just posted.\nThey've been warned since #{activity.user.roles.where(name: 'warned')[0].updated_at.strftime('%d %B %Y')}\nhttps://dev.to#{activity.path}",
|
||||
channel: "warned-user-activity",
|
||||
username: "sloan_watch_bot",
|
||||
icon_emoji: ":sloan:"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue