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

rename target id to related id and add jsdoc comments

This commit is contained in:
Bruno Windels
2019-06-07 16:56:50 +02:00
parent 7a10d504b2
commit f1336a5ce7
3 changed files with 18 additions and 6 deletions

View File

@@ -1730,11 +1730,11 @@ MatrixClient.prototype._sendCompleteEvent = function(roomId, eventObject, txnId,
}));
const room = this.getRoom(roomId);
const targetId = localEvent.getTargetId();
const targetId = localEvent.getRelatedId();
if (targetId && targetId.startsWith("~")) {
const target = room.getPendingEvents().find(e => e.getId() === targetId);
target.once("Event.localEventIdReplaced", () => {
localEvent.updateTargetId(target.getId());
localEvent.updateRelatedId(target.getId());
});
}
const type = localEvent.getType();