                 print("New active member: \(username)")
                 self.inactiveMembers.removeValue(forKey: uid)
                 self.activeMembers[uid] = username
+                
+                // Ask database manager for user's notification id and adds it to local dictionary
+                DatabaseController.notificationIDForUser(with: uid, completion: { notificationID in
+                    if let id = notificationID { self.notificationIDs[username] = id }
+                })
             }
-            
-            // Ask database manager for the *current* notification ID of every observed member
-            DatabaseController.notificationIDForUser(with: uid, completion: { notificationID in
-                
-                if let id = notificationID {
-                    
-                    // Add to local copy, but write it back to database as well
-                    self.notificationIDs.append(id)
-                }
-            })
         })
         
     

        updateLastSeenTimestamp(convoID: convoId)
        
        // Ask NotificationController to send this message as a push notification
        for notificationID in notificationIDs {
            NotificationsController.send(to: notificationID, title: message.sender, message: message.text ?? Constants.Placeholders.pictureMessagePlaceholder)
        }
    }

                print("New inactive member: \(username)")
                self.activeMembers.removeValue(forKey: uid)
                self.inactiveMembers[uid] = username
                
                // If current user or this observered user haven't blocked eachother, we can add 
                // them to notificationIDs so they can be notified that an old convo became active again
                AuthController.userOrCurrentUserHasBlocked(uid: uid, username: username, completion: { blocked in
                    
                    if blocked { self.notificationIDs.removeValue(forKey: username) }
                    
                    else {
                        // Ask database manager for user's notification id and adds it to local dictionary
                        DatabaseController.notificationIDForUser(with: uid, completion: { notificationID in
                            if let id = notificationID { self.notificationIDs[username] = id }
                        })
                    }
                })
            }
        })
    }
