     }
     
     private func invokeSuccessCallbacksForIdentifier(_ identifier: String, url: URL, duration: TimeInterval, samples: [Float]) {
-        guard let callbacks = completionCallbacks[identifier] else {
+        let callbackKey = CompletionCallbackKey(eventIdentifier: identifier, requiredNumberOfSamples: samples.count)
+        
+        guard let callbacks = completionCallbacks[callbackKey] else {
             return
         }
         

            }
        }
        
        self.completionCallbacks[identifier] = nil
    }
}

    }
}

private struct CompletionCallbackKey: Hashable {
    let eventIdentifier: String
    let requiredNumberOfSamples: Int
}

struct VoiceMessageAttachmentCacheManagerLoadResult {
    let eventIdentifier: String
    let url: URL
