diff --git a/src/notifications/ws.rs b/src/notifications/ws.rs index ba37ec9a44fc0ac1f57eabde07914e537ecc9b46..93e19162dfd713e3111c91e951f5677177f1dcd5 100644 --- a/src/notifications/ws.rs +++ b/src/notifications/ws.rs @@ -47,13 +47,20 @@ impl Handler for Server { .to_string(), )?; - self.sender.send( - json!({ - "type": "ready", - "data": user.create_payload() - }) - .to_string(), - ) + if let Ok(payload) = user.create_payload() { + self.sender.send( + json!({ + "type": "ready", + "data": payload + }) + .to_string(), + ) + } else { + // ! TODO: FIXME: ALL THE NOTIFICATIONS CODE NEEDS TO BE + // ! RESTRUCTURED, IT IS UTTER GARBAGE. :))))) + + Ok(()) + } } StateResult::DatabaseError => self.sender.send( json!({