Prevent infinite loop when missing local cache
@ -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)
@ -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