aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/api_controller.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb
index 15fb4f5f9..903ff648d 100644
--- a/app/controllers/api_controller.rb
+++ b/app/controllers/api_controller.rb
@@ -83,7 +83,7 @@ class ApiController < ApplicationController
direction = json["direction"]
body = json["body"]
- sent_at_str = json["sent_at"]
+ sent_at = json["sent_at"]
errors = []
@@ -107,12 +107,6 @@ class ApiController < ApplicationController
errors << "The 'body' is empty"
end
- begin
- sent_at = Time.iso8601(sent_at_str)
- rescue ArgumentError
- errors << "Failed to parse 'sent_at' field as ISO8601 time: #{sent_at_str}"
- end
-
if direction == "request" && !attachments.nil?
errors << "You cannot attach files to messages in the 'request' direction"
end