1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

rename related id to associated id

This commit is contained in:
Bruno Windels
2019-06-13 11:50:29 +02:00
parent 3ed9b00398
commit 4143a79f7b
3 changed files with 6 additions and 5 deletions

View File

@@ -1735,11 +1735,11 @@ MatrixClient.prototype._sendCompleteEvent = function(roomId, eventObject, txnId,
// that hasn't been sent yet (e.g. with a local id starting with a ~)
// then listen for the remote echo of that event so that by the time
// this event does get sent, we have the correct event_id
const targetId = localEvent.getRelatedId();
const targetId = localEvent.getAssociatedId();
if (targetId && targetId.startsWith("~")) {
const target = room.getPendingEvents().find(e => e.getId() === targetId);
target.once("Event.localEventIdReplaced", () => {
localEvent.updateRelatedId(target.getId());
localEvent.updateAssociatedId(target.getId());
});
}
const type = localEvent.getType();