Add topic publishing sidebar
This commit is contained in:
@@ -23,7 +23,7 @@ export function makeConnectionStateEvent(connectionId: string): Event<DataSource
|
||||
}
|
||||
}
|
||||
|
||||
interface Message {
|
||||
export interface Message {
|
||||
topic: string,
|
||||
payload: any
|
||||
}
|
||||
@@ -33,3 +33,9 @@ export function makeConnectionMessageEvent(connectionId: string): Event<Message>
|
||||
topic: `conn/${connectionId}`,
|
||||
}
|
||||
}
|
||||
|
||||
export function makePublishEvent(connectionId: string): Event<Message> {
|
||||
return {
|
||||
topic: `conn/publish/${connectionId}`,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user