def __init__(self, roomJID, roomName, password='', initResult=ACTION_RESULT.DO_NOTHING): super(CreateAction, self).__init__(entities.XMPPMucChannelEntity(roomJID, roomName, password=password), initResult=initResult)
def _addCommonChannelToStorage(self): sysChannelConfig = g_settings.server.XMPP.getChannelByType( XMPP_MUC_CHANNEL_TYPE.STANDARD) if sysChannelConfig is not None and sysChannelConfig['enabled']: channelJid = makeSystemRoomJID( channelType=XMPP_MUC_CHANNEL_TYPE.STANDARD) channelName = sysChannelConfig[ 'userString'] or channelJid.getDomain() sysChannelEntity = entities.XMPPMucChannelEntity( channelJid, channelName, isSystem=True, isLazy=True, channelType=XMPP_MUC_CHANNEL_TYPE.STANDARD) if self.channelsStorage.addChannel(sysChannelEntity): g_messengerEvents.channels.onChannelInited(sysChannelEntity) return
def _searchChannel(self, jid, name=''): created = entities.XMPPMucChannelEntity(jid, name) exists = self.channelsStorage.getChannel(created) return (created, exists)