Room.swift 396 B

1234567891011121314151617181920212223
  1. //
  2. // Room.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 Room {
  11. let jidString: String
  12. let name: String
  13. var messages: [XMPPMessage] = []
  14. }
  15. extension Room {
  16. var jid: XMPPJID {
  17. guard let jid = XMPPJID(string: jidString) else { return XMPPJID() }
  18. return jid
  19. }
  20. }