 import RealmSwift
 
 struct SubscriptionManager {
-
     static func updateUnreadApplicationBadge() {
         var unread = 0
 

            "name": "stream-notify-room",
            "id": eventName,
            "params": [eventName, false]
        ] as [String : Any]

        SocketManager.subscribe(request, eventName: eventName) { response in
            guard !response.isError() else { return Log.debug(response.result.string) }

            })
        }
    }
}

// MARK: Rooms, Groups & DMs
extension SubscriptionManager {
    static func createDirectMessage(_ username: String, completion: @escaping MessageCompletion) {
        let request = [
            "msg": "method",
            "method": "createDirectMessage",
            "params": [username]
            ] as [String : Any]

        SocketManager.send(request) { response in
            guard !response.isError() else { return Log.debug(response.result.string) }
