diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-08-02 18:32:38 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-08-02 20:01:26 +0900 |
commit | 16ed52736f38b7d42fadc5174472a48f6c623c8f (patch) | |
tree | ef297c07ab761c76e2ab0521660ba61cea7e305f /lib | |
parent | c05ade838f0fce81f2bbe80a3295618a8a26ff52 (diff) | |
download | libquotient-16ed52736f38b7d42fadc5174472a48f6c623c8f.tar.gz libquotient-16ed52736f38b7d42fadc5174472a48f6c623c8f.zip |
Room/qmc-example: consider fake state event rejection as valid
This is an addition in https://github.com/matrix-org/synapse/pull/5805 -
Synapse no more tolerates fake state events (which actually obviates
the need for this test but fake state events still go through on older
Synapses). To allow checking for both cases Room behaviour has been
slightly changed (without compat breakage) to make sure the pending
event status is set to ReachedServer (and pendingEventChanged() is
emitted, if necessary) before merging the pending event into the
timeline.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/room.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index b32d3492..95dba857 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1520,6 +1520,7 @@ QString Room::retryMessage(const QString& txnId) " events are likely to be in the timeline after retry"; } it->resetStatus(); + emit pendingEventChanged(int(it - d->unsyncedEvents.begin())); return d->doSendEvent(it->event()); } @@ -2189,6 +2190,8 @@ Room::Changes Room::Private::addNewMessageEvents(RoomEvents&& events) auto* nextPendingEvt = nextPending->get(); const auto pendingEvtIdx = int(nextPendingPair.second - unsyncedEvents.begin()); + nextPendingPair.second->setReachedServer(nextPendingEvt->id()); + emit q->pendingEventChanged(pendingEvtIdx); emit q->pendingEventAboutToMerge(nextPendingEvt, pendingEvtIdx); qDebug(EVENTS) << "Merging pending event from transaction" << nextPendingEvt->transactionId() << "into" |