Skip to content

Commit da84d32

Browse files
author
Jennie Lees
committed
Support received_recent_date thread ordering.
1 parent bb29ca2 commit da84d32

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ for thread in namespace.threads.where(starred=True):
109109
# List all threads with '[email protected]'
110110
for thread in namespace.threads.where(any_email='[email protected]').items():
111111
print thread.subject
112+
113+
# List threads in order of most recently received message (excludes sent messages)
114+
for thread in namespace.threads.where(sort='received_recent_date'):
115+
print thread.subject
112116
```
113117

114118

nylas/client/restful_models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ def messages(self):
213213
class Thread(NylasAPIObject):
214214
attrs = ["draft_ids", "id", "message_ids", "namespace_id", "object",
215215
"participants", "snippet", "subject", "subject_date", "tags",
216+
"last_message_timestamp", "first_message_timestamp",
216217
"unread", "starred", "version", "_folders", "_labels"]
217218
collection_name = 'threads'
218219

0 commit comments

Comments
 (0)