Пример #1
0
 def _compute_caps_hash(self):
     for a in gajim.connections:
         gajim.caps_hash[a] = caps_cache.compute_caps_hash(
             [gajim.gajim_identity], gajim.gajim_common_features + gajim.gajim_optional_features[a]
         )
         # re-send presence with new hash
         connected = gajim.connections[a].connected
         if connected > 1 and gajim.SHOW_LIST[connected] != "invisible":
             gajim.connections[a].change_status(gajim.SHOW_LIST[connected], gajim.connections[a].status)
Пример #2
0
 def _compute_caps_hash(self):
     for a in gajim.connections:
         gajim.caps_hash[a] = caps_cache.compute_caps_hash([
             gajim.gajim_identity], gajim.gajim_common_features + \
             gajim.gajim_optional_features[a])
         # re-send presence with new hash
         connected = gajim.connections[a].connected
         if connected > 1 and gajim.SHOW_LIST[connected] != 'invisible':
             gajim.connections[a].change_status(gajim.SHOW_LIST[connected],
                                                gajim.connections[a].status)
Пример #3
0
 def _compute_caps_hash(account):
     """ Computes the hash for Entity Capabilities and publishes it """
     gajim.caps_hash[account] = caps_cache.compute_caps_hash(
         [gajim.gajim_identity], gajim.gajim_common_features +
         gajim.gajim_optional_features[account])
     # re-send presence with new hash
     connected = gajim.connections[account].connected
     if connected > 1 and gajim.SHOW_LIST[connected] != 'invisible':
         gajim.connections[account].change_status(
             gajim.SHOW_LIST[connected], gajim.connections[account].status)
Пример #4
0
 def _compute_caps_hash(account):
     """ Computes the hash for Entity Capabilities and publishes it """
     gajim.caps_hash[account] = caps_cache.compute_caps_hash(
         [gajim.gajim_identity],
         gajim.gajim_common_features +
         gajim.gajim_optional_features[account])
     # re-send presence with new hash
     connected = gajim.connections[account].connected
     if connected > 1 and gajim.SHOW_LIST[connected] != 'invisible':
         gajim.connections[account].change_status(
             gajim.SHOW_LIST[connected], gajim.connections[account].status)
Пример #5
0
 def test_hash(self):
     '''tests the hash computation'''
     computed_hash = caps.compute_caps_hash(self.identities, self.features)
     self.assertEqual(self.caps_hash, computed_hash)
Пример #6
0
 def test_hash(self):
     '''tests the hash computation'''
     computed_hash = caps.compute_caps_hash(self.identities, self.features)
     self.assertEqual(self.caps_hash, computed_hash)