mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Patch #798297: Add IMAP THREAD command.
This commit is contained in:
parent
49ee14dac5
commit
d8921379e9
4 changed files with 38 additions and 0 deletions
|
@ -69,6 +69,7 @@ Commands = {
|
|||
'STATUS': ('AUTH', 'SELECTED'),
|
||||
'STORE': ('SELECTED',),
|
||||
'SUBSCRIBE': ('AUTH', 'SELECTED'),
|
||||
'THREAD': ('SELECTED',),
|
||||
'UID': ('SELECTED',),
|
||||
'UNSUBSCRIBE': ('AUTH', 'SELECTED'),
|
||||
}
|
||||
|
@ -679,6 +680,16 @@ class IMAP4:
|
|||
return self._simple_command('SUBSCRIBE', mailbox)
|
||||
|
||||
|
||||
def thread(self, threading_algorithm, charset, *search_criteria):
|
||||
"""IMAPrev1 extension THREAD command.
|
||||
|
||||
(type, [data]) = <instance>.thread(threading_alogrithm, charset, search_criteria, ...)
|
||||
"""
|
||||
name = 'THREAD'
|
||||
typ, dat = self._simple_command(name, threading_algorithm, charset, *search_criteria)
|
||||
return self._untagged_response(typ, dat, name)
|
||||
|
||||
|
||||
def uid(self, command, *args):
|
||||
"""Execute "command arg ..." with messages identified by UID,
|
||||
rather than message number.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue