Fix sending empty text with another content like file

This commit is contained in:
Julien Wadel 2023-04-20 16:48:47 +02:00
parent 9f4ba05e7f
commit c1f1a1f6f0

View file

@ -101,7 +101,7 @@ CREATE_PARENT_MODEL_FUNCTION(deleteChatRoom)
void ChatRoomProxyModel::sendMessage(const QString &text){
QString trim = text.trimmed();
if (mChatRoomModel && !trim.isEmpty()){
if (mChatRoomModel){
trim.replace(QChar::LineSeparator, QChar::LineFeed);// U+2028 is not recognized on Android app.
mChatRoomModel->sendMessage(trim);
}