     }
     
     func processEvent(_ event: MXEvent) {
-        guard let content = originalContent, let mxSession = mxSession else {
+        guard let content = originalContents[event.eventId], let mxSession = mxSession else {
             self.fallbackToOriginalContent(forEventId: event.eventId)
             return
         }


class NotificationService: UNNotificationServiceExtension {
    
    var contentHandlers: [String: ((UNNotificationContent) -> Void)] = [:]
    var originalContent: UNMutableNotificationContent?
    
    var cachedEvent: MXEvent?
    var mxSession: MXSession?

        guard let content = request.content.mutableCopy() as? UNMutableNotificationContent else {
            return
        }
        originalContents[eventId] = content
        contentHandlers[eventId] = contentHandler
        
        //  setup user account
