This commit is contained in:
reya
2024-07-28 14:29:01 +07:00
parent 268c1af5b1
commit fe0864c0ee
16 changed files with 391 additions and 305 deletions

View File

@@ -1,9 +1,9 @@
use nostr_sdk::prelude::*;
pub fn is_target(target: &PublicKey, tags: &Vec<Tag>) -> bool {
pub fn is_member(groups: Vec<&PublicKey>, tags: &Vec<Tag>) -> bool {
for tag in tags {
if let Some(TagStandard::PublicKey { public_key, .. }) = tag.as_standardized() {
if public_key == target {
if groups.contains(&public_key) {
return true;
}
}