This diff introduces a function which checks if thread is mentionable. It will be used when raw mention appears in notification text: we want to render it accordingly to users thread visibility.
Depends on D9005.
Differential D9006
[keyserver] Introduce function which checks if thread is mentionable • patryk on Aug 29 2023, 5:28 AM. Authored by Tags None Referenced Files
Details
Diff Detail
Event Timeline
Comment Actions The logic and the if/elses seem a little complicated, but at a first glance I'm not entirely certain if there's a simple way to decrease complexity. I'm also not super familiar with recursive SQL queries, so maybe it'd be good to have a blocking reviewer who is more familiar
Comment Actions
This query was taken from here (just changed containing_thread_id to parent_thread_id). It was actually written by me (with Ashoats help) so logically I should be a blocking reviewer since this code is the only recursive query in the keyserver :D. But I will find someone who knows more about recursive queries and add them as a blocking reviewer.
Comment Actions Ahh ok thanks for the link. Makes sense in that case, was just worried about the performance of it on production where there are a lot more threads but I think it should be ok
Comment Actions I spent some time walking through the logic and it makes sense to me. Extracting out messageThread.community, mentionedThread.community and genesis.id to variables and using those instead of accessing the object each time would read better to me, but that may just be personal preference
Comment Actions |