Skip to content
Snippets Groups Projects

Custom Emoji Drawer & Inline Message Actions

Merged Emmanuel Vodor requested to merge beta into master
1 file
+ 10
7
Compare changes
  • Side-by-side
  • Inline
@@ -7,7 +7,8 @@ converse.plugins.add('sib-subscribe-to-rai', {
@@ -7,7 +7,8 @@ converse.plugins.add('sib-subscribe-to-rai', {
dependencies: [
dependencies: [
'converse-rai',
'converse-rai',
],
],
async initialize() {
initialize() {
 
const { log } = converse.env;
const _converse = this._converse;
const _converse = this._converse;
const { api } = _converse;
const { api } = _converse;
@@ -51,13 +52,15 @@ converse.plugins.add('sib-subscribe-to-rai', {
@@ -51,13 +52,15 @@ converse.plugins.add('sib-subscribe-to-rai', {
}, 250);
}, 250);
});
});
// @MattJ Here userRooms is an array of each jabberID the user is on.
let userRooms = (await Promise.all([
getCircles,
getProjects,
])).flat();
api.listen.on('connected', async () => {
api.listen.on('connected', async () => {
 
 
// @MattJ Here userRooms is an array of each jabberID the user is on.
 
let userRooms = (await Promise.all([
 
getCircles,
 
getProjects,
 
])).flat();
 
 
log.info(`User rooms: ${userRooms.join(', ')}`);
await api.rooms.subscribe(userRooms);
await api.rooms.subscribe(userRooms);
});
});
Loading