Toggle posts only & mark all mail as read.

This commit is contained in:
Thomas Mathews 2023-01-24 10:46:44 -08:00
parent 83931e0085
commit 062ddda3d9
10 changed files with 83 additions and 22 deletions

View file

@ -155,3 +155,14 @@ function event_parse_reaction(ev) {
}
}
function event_is_dm(ev, mykey) {
if (ev.kind != KIND_DM)
return false;
if (ev.pubkey != mykey && event_tags_pubkey(ev, mykey))
return true;
return ev.pubkey == mykey;
}
function event_is_reply(ev) {
return !!ev.refs.reply;
}