Commit db128d00 authored by Jean-Baptiste Pasquier's avatar Jean-Baptiste Pasquier

minor: tests 0.9 beta

parent 7bcf828e
import 'https://unpkg.com/converse.js@5.0/dist/converse.min.js';
import 'https://unpkg.com/converse.js@5.0/dist/emojis.js';
import { Helpers, store } from 'https://unpkg.com/@startinblox/core@0.8';
import { Sib } from "https://unpkg.com/@startinblox/core@0.8/dist/libs/Sib.js";
import { StoreMixin } from 'https://unpkg.com/@startinblox/core@0.8/dist/mixins/storeMixin.js';
import { Helpers, store } from 'https://unpkg.com/@startinblox/core@beta';
import { Sib } from "https://unpkg.com/@startinblox/core@beta/dist/libs/Sib.js";
import { StoreMixin } from 'https://unpkg.com/@startinblox/core@beta/dist/mixins/storeMixin.js';
Helpers.importCSS('https://unpkg.com/converse.js@4.2/css/fonts.css');
......@@ -64,7 +64,8 @@ export const SibChat = {
if (this.resource.jabberRoom) {
this.jid = this.resource['foaf:jabberID'];
} else {
this.jid = (await store.get(this.resource.chatProfile['@id']))['foaf:jabberID'];
await store.initGraph(this.resource['@id'], this.context);
this.jid = (await store.get(this.resource['@id'])['chatProfile.jabberID']).toString();
}
await converse_sib.connected_deferred
converse_sib.service.plugins.sibChat.changeChat(
......@@ -152,15 +153,16 @@ export const SibChat = {
});
let user = await document.querySelector('sib-auth').getUser();
user = await store.get(user);
const jabberID = (await store.get(user.chatProfile['@id']))['foaf:jabberID'];
await store.initGraph(user['@id'], this.context);
user = store.get(user['@id']);
const jabberID = (await user['chatProfile.jabberID']).toString();
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'];
await store.initGraph(this.resource['@id'], this.context);
this.jid = (await store.get(this.resource['@id'])['chatProfile.jabberID']).toString();
}
} else {
this.jid = jabberID;
......
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