filters/protected_events: fix clippy
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
39d70fd179
commit
f08e805673
1 changed files with 2 additions and 4 deletions
|
|
@ -6,8 +6,8 @@ pub struct ProtectedEvents {}
|
|||
|
||||
impl NoteFilter for ProtectedEvents {
|
||||
fn filter_note(&mut self, input: &InputMessage) -> OutputMessage {
|
||||
for tag in &input.event.tags {
|
||||
for entry in tag {
|
||||
if let Some(tag) = input.event.tags.first() {
|
||||
if let Some(entry) = tag.first() {
|
||||
if entry == "-" {
|
||||
return OutputMessage::new(
|
||||
input.event.id.clone(),
|
||||
|
|
@ -15,9 +15,7 @@ impl NoteFilter for ProtectedEvents {
|
|||
Some("blocked: event marked as protected".to_string()),
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
OutputMessage::new(input.event.id.clone(), Action::Accept, None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue