feat(protocols): conversations - thread_id and in_reply_to written at delivery, list and read APIs
A reply now joins the conversation of the message it answers (Message-ID,
In-Reply-To, References), falling back to the subject for replies with no
headers. /mail/threads lists a folder as conversations and /mail/thread/{id}
returns one. Replying from the webmail flags the answered message.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ff89e9dc44
commit
67d0c8aa5a
17 files changed
+1025
-9
No files matched your search
@@ -98,6 +98,8 @@ func (r *Router) registerRoutes() {
|
||||
r.mux.HandleFunc("/api/v1/mail/folders", r.handleMailFolders)
|
||||
r.mux.HandleFunc("/api/v1/mail/messages", r.handleMailMessages)
|
||||
r.mux.HandleFunc("/api/v1/mail/message/", r.handleMailMessage)
|
||||
r.mux.HandleFunc("/api/v1/mail/threads", r.handleMailThreads)
|
||||
r.mux.HandleFunc("/api/v1/mail/thread/", r.handleMailThread)
|
||||
r.mux.HandleFunc("/api/v1/mail/seen", r.handleMailSeen)
|
||||
r.mux.HandleFunc("/api/v1/mail/flagged", r.handleMailFlagged)
|
||||
r.mux.HandleFunc("/api/v1/mail/send", r.handleMailSend)
|
||||
@@ -287,6 +289,18 @@ func (r *Router) handleMailFolders(w http.ResponseWriter, req *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
func (r *Router) handleMailThreads(w http.ResponseWriter, req *http.Request) {
|
||||
if r.mailReady(w) {
|
||||
r.mail.handleThreads(w, req)
|
||||
}
|
||||
}
|
||||
|
||||
func (r *Router) handleMailThread(w http.ResponseWriter, req *http.Request) {
|
||||
if r.mailReady(w) {
|
||||
r.mail.handleThread(w, req)
|
||||
}
|
||||
}
|
||||
|
||||
func (r *Router) handleMailMessages(w http.ResponseWriter, req *http.Request) {
|
||||
if r.mailReady(w) {
|
||||
r.mail.handleMessages(w, req)
|
||||
|
||||
Reference in new issue
Block a user