From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 59DDE1F41C; Mon, 27 Mar 2023 19:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1679944249; bh=jA0WhuuFllLDqApnSIb/BPkrjT6798+mxIShWUTKf4A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xNEye0oTY3pPZ/r/7LfVeKl/3I/AitUe2CU0DLiCx/muqwaK/2d6ha1y0EY+q4UP4 zlUfCS15Df5AAniD+Oe8lRKSSmoluoCf/DWOwB1FcOcH/aRhGy3mVWdAXHuefBVk53 tHIp+Ui8l7SmdSFxHNyyJuzMogCjEc/Ra2mWfi7Y= Date: Mon, 27 Mar 2023 19:10:49 +0000 From: Eric Wong To: Konstantin Ryabitsev Cc: meta@public-inbox.org Subject: Re: Cheap way to check for new messages in a thread Message-ID: <20230327191049.M277377@dcvr> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: Konstantin Ryabitsev wrote: > Hello: > > For the bugzilla integration work I'm doing, I need a way to check if there > were any updates to a thread since the last check. Right now, I'm just > grabbing the full thread, parsing it and seeing if there are any new > message-IDs that we don't know about, but it's very wasteful. Any way to just > issue something like "how many messages are in a thread with this message-id" > or "are there any updates to a thread with this message-id since > YYYYMMDDHHMMSS? lei q -t --only /path/to/(inbox|extindex) mid:$MSGID rt:APPROXIDATE.. Returns JSON and won't retrieve message bodies from git. I wouldn't query down to the second due to propagation delays, clock skew, etc, though. There might be a JMAP endpoint I can implement for WWW which only retrieves that info, but getting backreferences (required by the JMAP spec) to work properly seemed painful.