feat: broadcast events that match active client subscriptions
A broadcast channel sends messages to all connections. Any connection with a subscription that matches then sends it via websocket.
This commit is contained in:
@@ -52,6 +52,11 @@ impl From<EventCmd> for Result<Event> {
|
||||
}
|
||||
|
||||
impl Event {
|
||||
// get short event identifer
|
||||
pub fn get_event_id_prefix(&self) -> String {
|
||||
self.id.chars().take(8).collect()
|
||||
}
|
||||
|
||||
// check if this event is valid (should be propagated, stored) based on signature.
|
||||
fn is_valid(&self) -> bool {
|
||||
// validation is performed by:
|
||||
|
||||
Reference in New Issue
Block a user