lib/hackerone/client.rb in hackerone-client-0.3.1 vs lib/hackerone/client.rb in hackerone-client-0.3.2
- old
+ new
@@ -129,12 +129,15 @@
}
}
}
if message
- body[:message] = message
+ body[:data][:attributes][:message] = message
elsif STATES_REQUIRING_STATE_CHANGE_MESSAGE.include?(state)
fail ArgumentError, "State #{state} requires a message. No message was supplied."
+ else
+ # message is in theory optional, but a value appears to be required.
+ body[:data][:attributes][:message] = ""
end
post("reports/#{id}/state_changes", body)
end
## Public: retrieve a report