User.swift 363 B

12345678910111213141516171819202122
  1. //
  2. // User.swift
  3. // Chat (iOS)
  4. //
  5. // Created by Sergey Tarasov on 17.08.2022.
  6. //
  7. import Foundation
  8. import XMPPFramework
  9. import XMPPFrameworkSwift
  10. struct User {
  11. let jidString: String
  12. let nickname: String
  13. }
  14. extension User {
  15. var jid: XMPPJID {
  16. guard let jid = XMPPJID(string: jidString) else { return XMPPJID() }
  17. return jid
  18. }
  19. }