🐛 Fix multiple messages on spaces

This commit is contained in:
Simon V. Lejel 2024-02-18 17:06:26 +01:00
parent 48ae343609
commit 2eadc6cb89
Signed by: sl
GPG key ID: 6544A0430A2CFFAD

View file

@ -122,10 +122,9 @@ int main() {
// Create a new message object
Message message;
// FIXME Seems to send multiple messages if content contains spaces
// Get the content of the message from the user
cout << "Type message to server: ";
cin >> message.content;
std::getline(cin, message.content);
// Exit the program if the user typed "exit" as the content of the
// message