Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// ios/EncryptedChat/UsersViewController.swift:32
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
let userId = Account.shared.userId!
let userToChatWith = users[tableView.indexPathForSelectedRow!.row]
let channelId = [userId, userToChatWith].sorted().joined(separator: "-")
let viewController = segue.destination as! EncryptedChatViewController
let channelPresenter = ChannelPresenter(
type: .messaging,
id: channelId,
members: [User(id: userId), User(id: userToChatWith)]
viewController.user = userId
viewController.otherUser = userToChatWith
viewController.presenter = channelPresenter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.