Test converse events
This commit is contained in:
parent
457fb85d3f
commit
8b0f875219
19
renderer.js
19
renderer.js
|
@ -18,12 +18,29 @@ angApp.controller('AppController', function ($scope) {
|
||||||
var password = keytar.getPassword(xmppService, $scope.login);
|
var password = keytar.getPassword(xmppService, $scope.login);
|
||||||
password.then((result) => {
|
password.then((result) => {
|
||||||
$scope.password = result;
|
$scope.password = result;
|
||||||
|
|
||||||
|
converse.plugins.add('chimeVerse', {
|
||||||
|
initialize: function() {
|
||||||
|
var _converse = this._converse;
|
||||||
|
Promise.all([
|
||||||
|
_converse.api.waitUntil('rosterContactsFetched'),
|
||||||
|
_converse.api.waitUntil('chatBoxesFetched')
|
||||||
|
]).then(function() {
|
||||||
|
_converse.on('message', function (data) {
|
||||||
|
//_converse.api.archive.query({'with': 'admin2@localhost'});
|
||||||
|
console.log(data);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
converse.initialize({
|
converse.initialize({
|
||||||
bosh_service_url: $scope.boshService,
|
bosh_service_url: $scope.boshService,
|
||||||
view_mode: 'fullscreen',
|
view_mode: 'fullscreen',
|
||||||
jid: $scope.login,
|
jid: $scope.login,
|
||||||
password: $scope.password,
|
password: $scope.password,
|
||||||
auto_login: true
|
auto_login: true,
|
||||||
|
whitelisted_plugins: ['chimeVerse'],
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue