~sircmpwn/sr.ht-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH lists.sr.ht] Add is:thread & is:reply filters

Details
Message ID
<20190922012300.15568-1-svmhdvn@fastmail.com>
DKIM signature
missing
Download raw message
Patch: +3 -0
Also, fix bug where 'in_reply_to' never gets set.

Closes https://todo.sr.ht/~sircmpwn/lists.sr.ht/82.
---
 listssrht/blueprints/archives.py | 2 ++
 listssrht/process.py             | 1 +
 2 files changed, 3 insertions(+)

diff --git a/listssrht/blueprints/archives.py b/listssrht/blueprints/archives.py
index 7adc70b..cf2c385 100644
--- a/listssrht/blueprints/archives.py
+++ b/listssrht/blueprints/archives.py
@@ -76,7 +76,9 @@ def apply_search(query, terms=None):
    return search(query, terms, [Email.body, Email.subject], {
        "is": lambda q, v: q.filter({
            "patch": Email.is_patch,
            "reply": Email.parent_id != None,
            "request-pull": Email.is_request_pull,
            "thread": Email.nreplies > 0,
        }.get(v, False)),
        "from": lambda q, v: me_alias("From", q, v),
        "to": lambda q, v: me_alias("To", q, v),
diff --git a/listssrht/process.py b/listssrht/process.py
index 3e69544..f4b31c4 100644
--- a/listssrht/process.py
+++ b/listssrht/process.py
@@ -186,6 +186,7 @@ def _archive(dest, envelope):
    if parent is not None:
        mail.parent_id = parent.id
        mail.parent = parent
        mail.in_reply_to = reply_to

    thread = mail
    while thread.parent_id:
-- 
2.23.0
Details
Message ID
<BX94LK61V5W1.3NA1W94NU2HDD@homura>
In-Reply-To
<20190922012300.15568-1-svmhdvn@fastmail.com> (view parent)
DKIM signature
missing
Download raw message
Thanks! Applied your patch.
Reply to thread Export thread (mbox)