pymensago/userprofile.py
def resolve_address(self, address: utils.MAddress) -> RetVal:
		'''Resolves a Mensago address to its corresponding workspace ID.
		
		Parameters:
		  * address: the address to resolve
		
		Returns:
		  * wid: (UUID) the workspace ID of the address.

		Notes:
			This call works only for those addresses to which the profile has a
			membership. Resolving any arbitrary Mensago address should be done using the
			keycard resolver.
		'''

		if address.id_type == 1:
			return RetVal().set_value('wid', address.id.as_string())
		
		cursor = self.db.cursor()
		cursor.execute("SELECT wid FROM workspaces WHERE userid=? AND domain=?", 
			(address.id.as_string(), address.domain.as_string()))
		results = cursor.fetchone()
		if not results or not results[0]:
			return RetVal(ErrNotFound)

		return RetVal().set_value('wid', utils.UUID(results[0]))
Resolves a Mensago address to its corresponding workspace ID.
		
		Parameters:
		  * address: the address to resolve
		
		Returns:
		  * wid: (UUID) the workspace ID of the address.

		Notes:
			This call works only for those addresses to which the profile has a
			membership. Resolving any arbitrary Mensago address should be done using the
			keycard resolver.
		
Resolves a Mensago address to its corresponding workspace ID.
Resolves a Mensago address to its corresponding workspace ID .
def resolve_address(self, address: utils.MAddress) -> RetVal:
		if address.id_type == 1:
			return RetVal().set_value('wid', address.id.as_string())
		cursor = self.db.cursor()
		cursor.execute("SELECT wid FROM workspaces WHERE userid=? AND domain=?", 
			(address.id.as_string(), address.domain.as_string()))
		results = cursor.fetchone()
		if not results or not results[0]:
			return RetVal(ErrNotFound)
		return RetVal().set_value('wid', utils.UUID(results[0]))
def resolve_address ( self , address : utils . MAddress ) -> RetVal : if address . id_type == 1 : return RetVal ( ) . set_value ( 'wid' , address . id . as_string ( ) ) cursor = self . db . cursor ( ) cursor . execute ( "SELECT wid FROM workspaces WHERE userid=? AND domain=?" , ( address . id . as_string ( ) , address . domain . as_string ( ) ) ) results = cursor . fetchone ( ) if not results or not results [ 0 ] : return RetVal ( ErrNotFound ) return RetVal ( ) . set_value ( 'wid' , utils . UUID ( results [ 0 ] ) )
Resolves a Mensago address to its corresponding workspace ID.
Resolves a Mensago address to its corresponding workspace ID .
'''Resolves a Mensago address to its corresponding workspace ID.
		
		Parameters:
		  * address: the address to resolve
		
		Returns:
		  * wid: (UUID) the workspace ID of the address.

		Notes:
			This call works only for those addresses to which the profile has a
			membership. Resolving any arbitrary Mensago address should be done using the
			keycard resolver.
		'''
(UUID) the workspace ID of the address.
( UUID ) the workspace ID of the address .
self
address
utils.MAddress
* address
the address to resolve
the address to resolve