diff --git a/src/follows_differ.rs b/src/follows_differ.rs index 6a50f23..24bfb68 100644 --- a/src/follows_differ.rs +++ b/src/follows_differ.rs @@ -143,6 +143,11 @@ where { async fn call(&self, worker_task_item: WorkerTaskItem>) -> Result<()> { let WorkerTaskItem { item: event } = worker_task_item; + + if event.kind != Kind::ContactList { + return Ok(()); + } + let follower = event.pubkey; let event_created_at = convert_timestamp(event.created_at.as_u64())?; @@ -151,6 +156,8 @@ where let (mut follows_diff, maybe_latest_stored_updated_at) = self.initialize_follows_diff(&follower).await?; + let first_seen = follows_diff.is_empty(); + // Populate the new follows from the event tags self.populate_new_follows(&mut follows_diff, &event); @@ -165,7 +172,6 @@ where } } - let first_seen = follows_diff.is_empty(); // Process the follows_diff and apply changes let (followed_counter, unfollowed_counter, unchanged) = self .process_follows_diff(follows_diff, &follower, event_created_at)