Authenticate and subscribe to streaming after connection
This commit is contained in:
parent
cf7fab7103
commit
dfbc2704d8
4 changed files with 70 additions and 18 deletions
|
|
@ -87,6 +87,9 @@ const api = {
|
|||
const { state, commit, dispatch, rootState } = store
|
||||
const timelineData = rootState.statuses.timelines.friends
|
||||
state.mastoUserSocket = state.backendInteractor.startUserSocket({ store })
|
||||
state.mastoUserSocket.addEventListener('pleroma:authenticated', () => {
|
||||
state.mastoUserSocket.subscribe('user')
|
||||
})
|
||||
state.mastoUserSocket.addEventListener(
|
||||
'message',
|
||||
({ detail: message }) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue