6 Dec
2024
6 Dec
'24
12:43 a.m.
On 12/5/24 14:26, Bryan Fields wrote:
On 12/5/24 2:02 PM, Mark Sapiro wrote:
A bit obscure for laypersons, but one can compute the message_id_hash from the Message-ID
from base64 import b32encode from hashlib import sha1 def get_message_id_hash(msg_id): return b32encode(sha1(msg_id).digest()).decode()
Actually, that should be
return b32encode(sha1(msg_id.encode()).digest()).decode()
as sha1 wants bytes. I actually made a very simple command lime converter for myself
#!/usr/bin/env python3
import sys
from base64 import b32encode
from hashlib import sha1
print(b32encode(sha1(sys.argv[1].encode()).digest()).decode())
This is great to know. I assume the thread ID is generated the same way?
The thread ID is the message_id_hash of the first message in the thread, so yes.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan