Last active
July 5, 2019 17:02
-
-
Save bibscy/cda5a674861de6a31a55aa420ccd217a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension ChatViewController { | |
| struct NotificationInfoChat { | |
| let title: String | |
| let body: String | |
| let chatUID: String | |
| let unreadMessagesCount: Int | |
| let fcmToken: String | |
| let isDevelopment: Bool | |
| func toDictionary() -> [String : Any] { | |
| var someDict = [String : Any]() | |
| someDict["title"] = title | |
| someDict["body"] = body | |
| someDict["chatUID"] = chatUID | |
| someDict["sound"] = "default" | |
| someDict["badge"] = "1" | |
| someDict["unreadMessagesCount"] = unreadMessagesCount | |
| someDict["fcmToken"] = fcmToken | |
| someDict["type"] = "chat" | |
| someDict["createdAt"] = Int(Date().timeIntervalSince1970) | |
| someDict["isDevelopment"] = isDevelopment | |
| return someDict | |
| } | |
| } | |
| }//end extension |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment