summary refs log tree commit diff
path: root/src/MatrixClient.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-04-13 04:11:22 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-04-13 04:11:22 +0300
commit27f7142cd86a46d1b13d99a6b86c126892fa86ca (patch)
treef52d2ecf2ec2893cea67551b7c7fdde2fe39fe72 /src/MatrixClient.cc
parentDon't use icons as room avatars (diff)
downloadnheko-27f7142cd86a46d1b13d99a6b86c126892fa86ca.tar.xz
Initial implementation for local echo
Each HistoryView maintains a list of pending events. Each pending
message is validated from the homeserver with either the returned
EventId or the body of the message.

Currently there is no support to remove invalid messages.

Also some small refactoring:
    - ChatPage doesn't know about the message being sent. The message
      delivery is solely handled by HistoryViewManager.
    - Nick coloring function moved to HistoryViewManager.
Diffstat (limited to 'src/MatrixClient.cc')
-rw-r--r--src/MatrixClient.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/MatrixClient.cc b/src/MatrixClient.cc

index 7b45646c..9299c7eb 100644 --- a/src/MatrixClient.cc +++ b/src/MatrixClient.cc
@@ -258,9 +258,8 @@ void MatrixClient::onSendTextMessageResponse(QNetworkReply *reply) } emit messageSent(object.value("event_id").toString(), + reply->property("roomid").toString(), reply->property("txn_id").toInt()); - - incrementTransactionId(); } void MatrixClient::onRoomAvatarResponse(QNetworkReply *reply) @@ -446,6 +445,9 @@ void MatrixClient::sendTextMessage(const QString &roomid, const QString &msg) no reply->setProperty("endpoint", Endpoint::SendTextMessage); reply->setProperty("txn_id", txn_id_); + reply->setProperty("roomid", roomid); + + incrementTransactionId(); } void MatrixClient::initialSync() noexcept