         fallbackToOriginalContent()
     }
     
-    func setup() {
+    func setup(withRoomId roomId: String, completion: @escaping () -> Void) {
         let sdkOptions = MXSDKOptions.sharedInstance()
         sdkOptions.applicationGroupIdentifier = "group.im.vector"
         sdkOptions.disableIdenticonUseForUserAvatar = true

        }
        
        //  setup user account
        setup()
        
        //  fetch the event first
        fetchEvent()
    }
    
    override func serviceExtensionTimeWillExpire() {

    }
    
    func launchBackgroundSync() {
        guard let mxSession = mxSession else {
            NSLog("[NotificationService] launchBackgroundSync: mxSession is missing.")
            self.fallbackToOriginalContent()
            return
        }

        //  launch an initial background sync
        mxSession.initialBackgroundSync(withTimeout: 20000) { [weak self] (response) in
            switch response {
            case .success:
                guard let self = self else {
                    NSLog("[NotificationService] launchBackgroundSync: MXSession.initialBackgroundSync returned too late successfully")
                    return
                }
                self.fetchEvent()
                break
            case .failure(let error):
                guard let self = self else {
                    NSLog("[NotificationService] launchBackgroundSync: MXSession.initialBackgroundSync returned too late with error: \(String(describing: error))")
                    return
                }
                NSLog("[NotificationService] launchBackgroundSync: MXSession.initialBackgroundSync returned with error: \(String(describing: error))")
                self.fallbackToOriginalContent()
                break
            }
        }
    }
    
    func processEvent(_ event: MXEvent) {
        guard let content = originalContent, let mxSession = mxSession else {
            self.fallbackToOriginalContent()
            return
        }

        self.notificationContent(forEvent: event, inSession: mxSession) { (notificationContent) in
            //  close store
            self.store.close()
            
            // Modify the notification content here...
            if let newContent = notificationContent {
