Fixed own notification issue.
This commit is contained in:
parent
99fc9118b3
commit
7d750db1f8
@ -298,7 +298,6 @@ class NotificationAudio {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class App extends EventHandler {
|
class App extends EventHandler {
|
||||||
rooms = []
|
|
||||||
rest = rest
|
rest = rest
|
||||||
ws = null
|
ws = null
|
||||||
rpc = null
|
rpc = null
|
||||||
@ -306,7 +305,6 @@ class App extends EventHandler {
|
|||||||
user = {}
|
user = {}
|
||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super()
|
||||||
this.rooms.push(new Room("General"))
|
|
||||||
this.ws = new Socket()
|
this.ws = new Socket()
|
||||||
this.rpc = this.ws.client
|
this.rpc = this.ws.client
|
||||||
const me = this
|
const me = this
|
||||||
@ -314,7 +312,10 @@ class App extends EventHandler {
|
|||||||
this.ws.addEventListener("channel-message", (data) => {
|
this.ws.addEventListener("channel-message", (data) => {
|
||||||
me.emit(data.channel_uid, data)
|
me.emit(data.channel_uid, data)
|
||||||
})
|
})
|
||||||
this.user = await this.rpc.getUser(null)
|
|
||||||
|
this.rpc.getUser(null).then(user=>{
|
||||||
|
me.user = user
|
||||||
|
})
|
||||||
}
|
}
|
||||||
playSound(index){
|
playSound(index){
|
||||||
this.audio.play(index)
|
this.audio.play(index)
|
||||||
|
Loading…
Reference in New Issue
Block a user