FIX(client): Respect unlimited imagemessagelength

When you set the imagemessagelength to 0 on the server and paste an
image into the client chat no error should pop up that the image is too
large.
This commit is contained in:
Meru Alagalingam 2020-12-04 23:06:21 +01:00
parent c97c15059d
commit 8f2903eeba

View File

@ -187,7 +187,7 @@ bool ChatbarTextEdit::sendImagesFromMimeData(const QMimeData *source) {
QString imgHtml = QLatin1String("<br />") + Log::imageToImg(image);
if (static_cast< unsigned int >(imgHtml.length()) < g.uiImageLength) {
if ((g.uiImageLength == 0) || static_cast< unsigned int >(imgHtml.length()) < g.uiImageLength) {
emit pastedImage(imgHtml);
return true;
} else {