Files
coop/src-tauri/src/common.rs
2024-07-28 14:29:01 +07:00

13 lines
274 B
Rust

use nostr_sdk::prelude::*;
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 groups.contains(&public_key) {
return true;
}
}
}
false
}