mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Allow writing messages in a lonely groupchat
This commit is contained in:
parent
fb63232318
commit
4920f2a2d4
|
@ -101,13 +101,23 @@ void GroupChatForm::onSendTriggered()
|
|||
msgEdit->setLastMessage(msg);
|
||||
msgEdit->clear();
|
||||
|
||||
if (msg.startsWith("/me "))
|
||||
bool isAction = msg.startsWith("/me ");
|
||||
|
||||
if (group->getPeersCount() != 1)
|
||||
{
|
||||
if (isAction)
|
||||
{
|
||||
msg = msg.right(msg.length() - 4);
|
||||
emit sendAction(group->getGroupId(), msg);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
emit sendMessage(group->getGroupId(), msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
QDateTime timestamp = QDateTime::currentDateTime();
|
||||
addSelfMessage(msg, isAction, timestamp, true);
|
||||
}
|
||||
}
|
||||
|
||||
void GroupChatForm::onUserListChanged()
|
||||
|
|
Loading…
Reference in New Issue
Block a user