//
//  Chat.swift
//  Sportify (iOS)
//
//  Created by Martin Peshevski on 17.8.21.
//

import UIKit
import MessageKit
import Firebase

struct Chat {
    var users: [String]
    
    var dictionary: [String: Any] {
        return ["users": users]
    }
}

extension Chat {
    init?(dictionary: [String:Any]) {
        guard let chatUsers = dictionary["users"] as? [String] else { return nil }
        self.init(users: chatUsers)
    }
}

struct ChatUser: SenderType, Equatable {
    var senderId: String
    var displayName: String
}
