Use url and headers_to_save in a received event if included

That seems to be what was actually intended, judging from the specs.

See [my comment](https://github.com/cantino/huginn/pull/1521#discussion_r86488243) in #1521.
This commit is contained in:
Akinori MUSHA 2016-11-04 15:00:28 +09:00
parent cc28f780c5
commit 6d4fdd3196

View file

@ -66,7 +66,8 @@ module Agents
def receive(incoming_events)
incoming_events.each do |event|
interpolate_with(event) do
check_this_url interpolated[:url], header_array(interpolated[:headers_to_save])
check_this_url event.payload[:url] || interpolated[:url],
header_array(event.payload[:headers_to_save] || interpolated[:headers_to_save])
end
end
end