Commit 0ccbd69 1 parent 3e9ff50 commit 0ccbd69 Copy full SHA for 0ccbd69
File tree 3 files changed +18
-3
lines changed
3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 965
965
module XGmExt1 = struct
966
966
type msg_att_extension + =
967
967
MSG_ATT_XGMMSGID of Uint64 .t
968
+ | MSG_ATT_XGMTHRID of Uint64 .t
968
969
| MSG_ATT_XGMLABELS of string list
969
970
970
971
let fetch_att_xgmmsgid = FETCH_ATT_EXTENSION " X-GM-MSGID"
972
+
973
+ let fetch_att_xgmthrid = FETCH_ATT_EXTENSION " X-GM-THRID"
971
974
972
975
let fetch_att_xgmlabels = FETCH_ATT_EXTENSION " X-GM-LABELS"
973
976
@@ -979,6 +982,8 @@ module XGmExt1 = struct
979
982
function
980
983
MSG_ATT_XGMMSGID id ->
981
984
Some (fun ppf -> fprintf ppf " (x-gm-msgid %s)" (Uint64. to_string id))
985
+ | MSG_ATT_XGMTHRID id ->
986
+ Some (fun ppf -> fprintf ppf " (x-gm-thrid %s)" (Uint64. to_string id))
982
987
| MSG_ATT_XGMLABELS labels ->
983
988
let p ppf = List. iter (fun x -> fprintf ppf " @ %S" x) in
984
989
Some (fun ppf -> fprintf ppf " @[<2>(x-gm-labels%a)@]" p labels)
@@ -994,14 +999,18 @@ module XGmExt1 = struct
994
999
str " X-GM-MSGID" >> char ' ' >> uint64 >> = fun n ->
995
1000
ret (MSG_ATT_XGMMSGID n)
996
1001
in
1002
+ let thrid =
1003
+ str " X-GM-THRID" >> char ' ' >> uint64 >> = fun n ->
1004
+ ret (MSG_ATT_XGMTHRID n)
1005
+ in
997
1006
let labels =
998
1007
str " X-GM-LABELS" >> char ' ' >>
999
1008
char '(' >> sep (char ' ' ) astring >> = fun labels -> char ')' >>
1000
1009
ret (MSG_ATT_XGMLABELS labels)
1001
1010
in
1002
1011
match kind with
1003
1012
FETCH_DATA ->
1004
- alt msgid labels
1013
+ altn [ msgid; thrid; labels ]
1005
1014
| _ ->
1006
1015
fail
1007
1016
Original file line number Diff line number Diff line change @@ -157,10 +157,13 @@ end
157
157
module XGmExt1 : sig
158
158
type msg_att_extension + =
159
159
MSG_ATT_XGMMSGID of Uint64 .t
160
- | MSG_ATT_XGMLABELS of string list
160
+ | MSG_ATT_XGMTHRID of Uint64 .t
161
+ | MSG_ATT_XGMLABELS of string list
161
162
162
163
val fetch_att_xgmmsgid : fetch_att
163
164
165
+ val fetch_att_xgmthrid : fetch_att
166
+
164
167
val fetch_att_xgmlabels : fetch_att
165
168
166
169
val uid_store_xgmlabels : ImapSet .t -> store_att_flags_sign -> bool -> string list -> unit command
Original file line number Diff line number Diff line change @@ -1301,7 +1301,7 @@ let fetch_messages s ~folder ~request ~req_type ?(modseq = Modseq.zero) ?mapping
1301
1301
| GmailLabels :: rest ->
1302
1302
loop (ImapCommands.XGmExt1. fetch_att_xgmlabels :: acc) headers rest
1303
1303
| GmailThreadID :: rest ->
1304
- failwith " fetch gmail thread id not implemented "
1304
+ loop ( ImapCommands.XGmExt1. fetch_att_xgmthrid :: acc) headers rest
1305
1305
| GmailMessageID :: rest ->
1306
1306
loop (ImapCommands.XGmExt1. fetch_att_xgmmsgid :: acc) headers rest
1307
1307
| FullHeaders :: rest ->
@@ -1371,6 +1371,9 @@ let fetch_messages s ~folder ~request ~req_type ?(modseq = Modseq.zero) ?mapping
1371
1371
| MSG_ATT_ITEM_EXTENSION (ImapCommands.XGmExt1. MSG_ATT_XGMMSGID gmail_message_id' ) ->
1372
1372
gmail_message_id := gmail_message_id';
1373
1373
needs_gmail_message_id := false
1374
+ | MSG_ATT_ITEM_EXTENSION (ImapCommands.XGmExt1. MSG_ATT_XGMTHRID gmail_thread_id' ) ->
1375
+ gmail_thread_id := gmail_thread_id';
1376
+ needs_gmail_thread_id := false
1374
1377
| _ -> (* FIXME *) ()
1375
1378
in
1376
1379
You can’t perform that action at this time.
0 commit comments