Commit 7b5eda79 authored by Jean-Baptiste Pasquier's avatar Jean-Baptiste Pasquier

fix: load chat from another page

parent 9efb32f0
Pipeline #5624 passed with stage
in 27 seconds
......@@ -143,10 +143,14 @@ export const SibChat = {
const jabberID = (await store.get(user.chatProfile['@id']))['foaf:jabberID'];
if (this.resource.jabberRoom) {
this.jid = this.resource['foaf:jabberID'];
if(this.resource) {
if (this.resource.jabberRoom) {
this.jid = this.resource['foaf:jabberID'];
} else {
this.jid = (await store.get(this.resource.chatProfile['@id']))['foaf:jabberID'];
}
} else {
this.jid = (await store.get(this.resource.chatProfile['@id']))['foaf:jabberID'];
this.jid = jabberID;
}
const idToken = await document.querySelector('sib-auth').getUserIdToken();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment