core, bridge: new devicesInfosGet method to get infos on known devices of an entity

This commit is contained in:
Goffi 2020-03-06 18:19:03 +01:00
commit 5a467b15d5

View file

@ -17,19 +17,18 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _
from sat.core.log import getLogger
log = getLogger(__name__)
import os.path
import copy
from collections import namedtuple
import shortuuid
import mimetypes
import time
from uuid import uuid4
from collections import namedtuple
from twisted.python import failure
from twisted.internet import defer, reactor, error
from twisted.words.protocols.jabber import jid
from sat.core.i18n import _
from sat.core.log import getLogger
from sat.core import exceptions
from sat.core.constants import Const as C
from sat.memory.sqlite import SqliteStorage
@ -40,9 +39,9 @@ from sat.memory.crypto import BlockCipher
from sat.memory.crypto import PasswordHasher
from sat.tools import config as tools_config
from sat.tools.common import data_format
import shortuuid
import mimetypes
import time
log = getLogger(__name__)
PresenceTuple = namedtuple("PresenceTuple", ("show", "priority", "statuses"))
@ -690,7 +689,7 @@ class Memory(object):
"""Return all resource from jid for which we have had data in this session
@param entity_jid: bare jid of the entity
return (list[unicode]): list of resources
return (set[unicode]): set of resources
@raise exceptions.UnknownEntityError: if entity is not in cache
@raise ValueError: entity_jid has a resource