コード例 #1
0
ファイル: manager.py プロジェクト: webiumsk/WOT-0.9.15.1
 def _addCompanyChannelToStorage(self):
     companyChannelConfig = g_settings.server.XMPP.getChannelByType(XMPP_MUC_CHANNEL_TYPE.COMPANY)
     if companyChannelConfig is not None and companyChannelConfig['enabled']:
         channelJid = makeSystemRoomJID(channelType=XMPP_MUC_CHANNEL_TYPE.COMPANY)
         channelName = companyChannelConfig['userString'] or channelJid.getDomain()
         companyChannelEntity = entities.XMPPMucChannelEntity(channelJid, channelName, isSystem=True, isLazy=True, channelType=XMPP_MUC_CHANNEL_TYPE.COMPANY)
         if self.channelsStorage.addChannel(companyChannelEntity):
             g_messengerEvents.channels.onChannelInited(companyChannelEntity)
     return
コード例 #2
0
ファイル: xmppentities.py プロジェクト: Difrex/wotsdk
 def __init__(self, mucChannelType=XMPP_MUC_CHANNEL_TYPE.UNKNOWN, name=''):
     jid = makeSystemRoomJID(channelType=mucChannelType)
     channelName = name or jid.getDomain()
     super(XmppSystemChannelEntity,
           self).__init__(jid,
                          name=channelName,
                          isLazy=True,
                          isSystem=True,
                          channelType=mucChannelType)
コード例 #3
0
ファイル: manager.py プロジェクト: webiumsk/WOT-0.9.15.1
 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