Skip to content

Commit

Permalink
SlackLogger: Skip tombstone messages
Browse files Browse the repository at this point in the history
  • Loading branch information
hakatashi authored Feb 28, 2023
1 parent 30c8b38 commit d3a4e97
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/slack_logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ def is_direct_message(channel_name)
channel_name[0] == 'D'
end

def is_tombstone(message)
message['subtype'] == 'tombstone'
end

def skip_message?(message)
channel = message['channel']
is_private_channel(channel) || is_direct_message(channel)
is_private_channel(channel) || is_direct_message(channel) || is_tombstone(message)
end

def new_message(message)
Expand Down

0 comments on commit d3a4e97

Please sign in to comment.