refactor
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user