This commit is contained in:
retoor 2025-01-27 03:37:04 +01:00
parent 26210f8c09
commit 095e30a92f
2 changed files with 1 additions and 4 deletions

View File

@ -41,9 +41,7 @@ class ChatWindowElement extends HTMLElement {
this.container.appendChild(chatInput) this.container.appendChild(chatInput)
this.component.appendChild(this.container) this.component.appendChild(this.container)
console.info(channel)
const messages = await app.rpc.getMessages(channel.uid) const messages = await app.rpc.getMessages(channel.uid)
console.info(messages)
messages.forEach(message=>{ messages.forEach(message=>{
if(!message['user_nick']) if(!message['user_nick'])
return return
@ -56,7 +54,7 @@ class ChatWindowElement extends HTMLElement {
message.detail.element.scrollIntoView({behavior: 'smooth'}) message.detail.element.scrollIntoView({behavior: 'smooth'})
},10) },10)
}) })
await app.rpc.sendMessage(channel.uid,"Grrrrr")
} }

View File

@ -82,7 +82,6 @@ class MessageListElement extends HTMLElement {
this.channel_uid = this.getAttribute("channel") this.channel_uid = this.getAttribute("channel")
const me = this const me = this
app.addEventListener(this.channel_uid, (data) => { app.addEventListener(this.channel_uid, (data) => {
console.info("WIIIIIIIIIIIIIIIIIIIIIIII")
me.addMessage(data) me.addMessage(data)
}) })
this.dispatchEvent(new CustomEvent("rendered", {detail:this,bubbles:true})) this.dispatchEvent(new CustomEvent("rendered", {detail:this,bubbles:true}))