Add topic publishing sidebar

This commit is contained in:
Thomas Nordquist
2019-01-11 00:40:05 +01:00
parent eb375073f9
commit c3ef9335c0
13 changed files with 292 additions and 15 deletions

View File

@@ -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}`,
}
}