diff --git a/BeagleIM/channel/CreateChannelView.swift b/BeagleIM/channel/CreateChannelView.swift index 6d8cd2ec..7c9707a1 100644 --- a/BeagleIM/channel/CreateChannelView.swift +++ b/BeagleIM/channel/CreateChannelView.swift @@ -160,7 +160,15 @@ class CreateChannelView: NSView, OpenChannelViewControllerTabView, NSTextFieldDe self?.delegate?.operationFinished(); } }) - mixModule.publishInfo(for: channelJid, info: ChannelInfo(name: channelName, description: channelDescription, contact: []), completionHandler: nil); + let info = ChannelInfo(name: channelName, description: channelDescription, contact: []); + mixModule.publishInfo(for: channelJid, info: info, completionHandler: { result in + switch result { + case .success(_): + mixModule.channelManager.update(channel: channelJid, info: info); + default: + break; + } + }); if let avatarData = avatar?.scaled(maxWidthOrHeight: 512.0, format: .jpeg, properties: [.compressionFactor: 0.8]) { avatarModule.publishAvatar(at: channelJid, data: avatarData, mimeType: "image/jpeg", completionHandler: { result in print("avatar publication result:", result); diff --git a/BeagleIM/chatslist/ChatsListView.swift b/BeagleIM/chatslist/ChatsListView.swift index ee21ff62..4c24a4a7 100644 --- a/BeagleIM/chatslist/ChatsListView.swift +++ b/BeagleIM/chatslist/ChatsListView.swift @@ -80,6 +80,15 @@ class UnifiedChatItem: AbstractChatItem { let isInRoster: Bool; + override var name: String { + get { + return (self.chat as? DBChatStore.DBChannel)?.name ?? super.name; + } + set { + super.name = newValue; + } + } + init(chat: DBChatProtocol) { var name = chat.jid.stringValue; switch chat {