Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reply_to_message_id field in Messages #376

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### Unreleased
* Add missing hosted authentication parameters
* Add `reply_to_message_id` field in `Messages`
* Fix calendar availability failing when `round_robin` is `nil`

### 5.11.0 / 2022-07-08
Expand Down
1 change: 1 addition & 0 deletions lib/nylas/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Message
attribute :folder, :folder
attribute :folder_id, :string
attribute :metadata, :hash
attribute :reply_to_message_id, :string, read_only: true
attribute :job_status_id, :string, read_only: true

has_n_of_attribute :labels, :label, read_only: true
Expand Down
5 changes: 4 additions & 1 deletion spec/nylas/message_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
folder: { display_name: "Inbox", id: "folder-inbox", name: "inbox" },
labels: [{ display_name: "Inbox", id: "label-inbox", name: "inbox" },
{ display_name: "All Mail", id: "label-all", name: "all" }],
metadata: { key: "value" } }
metadata: { key: "value" },
reply_to_message_id: "reply-id" }

message = described_class.from_json(JSON.dump(data), api: api)
expect(message.id).to eql "mess-8766"
Expand Down Expand Up @@ -122,6 +123,8 @@
expect(message.labels[1].api).to be api

expect(message.metadata).to include(key: "value")

expect(message.reply_to_message_id).to eql "reply-id"
end
end

Expand Down