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
| // | |
| // LoginViewController.swift | |
| // Messenger | |
| // | |
| // Created by Janna McLaughlin0- | |
| // | |
| import UIKit | |
| class LoginViewController: UIViewController, UITextFieldDelegate { |
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
| func toggleReaction(message: SBDBaseMessage, reactionName: String){ | |
| let userId: String = SBDMain.getCurrentUser()?.userId ?? "" | |
| if !userId.isEmpty { | |
| let channel = self.channel | |
| let reaction = [ | |
| reactionName: [userId] | |
| ] | |
| let messageReactions = message.metaArray | |
| let reactedUsers = messageReactions[reactionName] | |
| let currentUserAlreadyReacted = reactedUsers?.contains(userId) ?? false |