Fix voice message forwarding and playback
This commit is contained in:
@@ -80,7 +80,24 @@ public static class QMaxDatabaseCleanup
|
||||
WHERE message.Direction = 'Outgoing'
|
||||
AND localAttachment.Id <> remoteAttachment.Id
|
||||
AND localAttachment.SortOrder = remoteAttachment.SortOrder
|
||||
AND localAttachment.Kind = remoteAttachment.Kind
|
||||
AND (
|
||||
localAttachment.Kind = remoteAttachment.Kind OR
|
||||
(
|
||||
localAttachment.Kind = 'VoiceNote'
|
||||
AND remoteAttachment.Kind = 'File'
|
||||
AND localAttachment.FileSizeBytes = remoteAttachment.FileSizeBytes
|
||||
AND (
|
||||
lower(remoteAttachment.ContentType) LIKE 'audio/%' OR
|
||||
lower(remoteAttachment.OriginalFileName) LIKE '%.m4a' OR
|
||||
lower(remoteAttachment.OriginalFileName) LIKE '%.ogg' OR
|
||||
lower(remoteAttachment.OriginalFileName) LIKE '%.opus' OR
|
||||
lower(remoteAttachment.OriginalFileName) LIKE '%.aac' OR
|
||||
lower(remoteAttachment.OriginalFileName) LIKE '%.mp3' OR
|
||||
lower(remoteAttachment.OriginalFileName) LIKE '%.wav' OR
|
||||
lower(remoteAttachment.OriginalFileName) LIKE '%.flac'
|
||||
)
|
||||
)
|
||||
)
|
||||
AND (localAttachment.ExternalId IS NULL OR trim(localAttachment.ExternalId) = '')
|
||||
AND (localAttachment.RemoteUrl IS NULL OR trim(localAttachment.RemoteUrl) = '')
|
||||
AND localAttachment.StorageFileName NOT LIKE 'remote-%'
|
||||
|
||||
Reference in New Issue
Block a user