metamaps--metamaps/app/models/webhooks/slack/synapse_removed_from_map.rb

10 lines
423 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-11-06 16:15:18 +00:00
class Webhooks::Slack::SynapseRemovedFromMap < Webhooks::Slack::Base
def text
connector = eventable.desc.empty? ? '->' : eventable.desc
# TODO: express correct directionality of arrows when desc is empty
"\"*#{eventable.topic1.name}* #{connector} *#{eventable.topic2.name}*\" was removed by *#{event.user.name}* as a connection from the map *#{view_map_on_metamaps}*"
end
end