diff --git a/app/widgets/Chat/Chat.php b/app/widgets/Chat/Chat.php index 20b018863..c31d86df1 100644 --- a/app/widgets/Chat/Chat.php +++ b/app/widgets/Chat/Chat.php @@ -686,7 +686,8 @@ class Chat extends \Movim\Widget\Base $sticker = $p->get($message->sticker, false, false, 'png'); $stickerSize = $p->getSize(); - if ($sticker == false) { + if ($sticker == false + && $message->jidfrom != $message->session) { $r = new Request; $r->setTo($message->jidfrom) ->setResource($message->resource) diff --git a/app/widgets/Stickers/Stickers.php b/app/widgets/Stickers/Stickers.php index cd38bffa0..c65fd78a9 100644 --- a/app/widgets/Stickers/Stickers.php +++ b/app/widgets/Stickers/Stickers.php @@ -51,14 +51,9 @@ class Stickers extends \Movim\Widget\Base if(!file_exists($filepath)) return; - // We get the base64 - $base64 = base64_encode(file_get_contents($filepath)); - // Caching the picture if(!file_exists(CACHE_PATH.md5($key).'.png')) { - $p = new Picture; - $p->fromBase($base64); - $p->set($key, 'png'); + copy($filepath, CACHE_PATH.md5($key).'.png'); } // Creating a message