lib/ruboty/adapters/slack_rtm.rb in ruboty-slack_rtm-2.4.0 vs lib/ruboty/adapters/slack_rtm.rb in ruboty-slack_rtm-2.4.1
- old
+ new
@@ -127,12 +127,12 @@
}
robot.receive(message_info.merge(body: CGI.unescapeHTML(data['text']))
(data['attachments'] || []).each do |attachment|
- body = (attachments['fallback'] || "#{attachment['text']} #{attachment['pretext']}").to_s
+ body = (attachments['fallback'] || "#{attachment['text']} #{attachment['pretext']}")
- robot.receive(message_info.merge(body: CGI.unescapeHTML(body)) unless text.empty?
+ robot.receive(message_info.merge(body: CGI.unescapeHTML(body)) unless body.empty?
end
end
def on_channel_change(data)
make_channels_cache