Skip to content

Commit

Permalink
robo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrashed-dev committed Dec 21, 2023
1 parent 5fa002c commit 50282b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/nylas/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ def detect_provider(email_address)
def send!(message)
return message.send! if message.respond_to?(:send!)
return NewMessage.new(**message.merge(api: self)).send! if message.respond_to?(:key?)
return RawMessage.new(message, api: self).send! if message.is_a? String

RawMessage.new(message, api: self).send! if message.is_a? String

Check warning on line 227 in lib/nylas/api.rb

View check run for this annotation

Codecov / codecov/patch

lib/nylas/api.rb#L227

Added line #L227 was not covered by tests
end

# Allows you to get an API that acts as a different user but otherwise has the same settings
Expand Down
3 changes: 2 additions & 1 deletion lib/nylas/types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def serialize(object)

def cast(value)
return JSON.parse(value, symbolize_names: true) if value.is_a?(String)
return value if value.respond_to?(:key)

value if value.respond_to?(:key)
end
end
Types.registry[:hash] = HashType.new
Expand Down

0 comments on commit 50282b0

Please sign in to comment.