@ -114,6 +114,7 @@ class PresenceBufferSaver
Scheduler::getInstance()->append('avatar_' . $jid . '_' . $avatarhash, function () use ($jid, $avatarhash) {
// Last check before firing the request, the avatar might have been received in the meantime
$contact = Contact::where('avatarhash', $avatarhash)->where('id', $jid)->first();
if (!$contact || $contact->avatartype == null) {
$r = new Get;
$r->setAvatarhash($avatarhash)
@ -52,11 +52,6 @@ class AdHoc extends \Movim\Widget\Base
$view = $this->tpl();
$view->assign('jid', $packet->from);
// Refresh the AdHoc list in any cases
if ((string)$command->attributes()->status === 'completed') {
$this->rpc('AdHoc.init');
}
if (isset($command->note)) {
$view->assign('note', $command->note);
Dialog::fill($view->draw('_adhoc_note'));
@ -1,12 +1,4 @@
var AdHoc = {
init: function () {
var parts = MovimUtils.urlParts();
if (parts.page === "contact") {
AdHoc_ajaxGet(parts.params[0]);
} else {
AdHoc_ajaxGet();
},
refresh: function () {
var items = document.querySelectorAll('.adhoc_widget .actions li:not(.subheader)');
var i = 0;
@ -54,7 +46,3 @@ var AdHoc = {
MovimWebsocket.attach(function () {
AdHoc.init();
});