Merge pull request #1789 from famedly/krille/do-not-delete-file-in-constructor

refactor: Removes the behavior of deleting an event if the file is no longer cached
This commit is contained in:
Krille-chan 2024-05-07 10:33:25 +02:00 committed by GitHub
commit e4acb1f510
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 13 deletions

View File

@ -145,19 +145,6 @@ class Event extends MatrixEvent {
);
}
}
// If this is failed to send and the file is no longer cached, it should be removed!
if (!status.isSent &&
{
MessageTypes.Image,
MessageTypes.Video,
MessageTypes.Audio,
MessageTypes.File,
}.contains(messageType) &&
!room.sendingFilePlaceholders.containsKey(eventId)) {
// ignore: discarded_futures
remove();
}
}
static Map<String, dynamic> getMapFromPayload(Object? payload) {