#NEWLINE# def signedAssociationStringForThreepid( self , medium , address ) : #NEWLINE# #INDENT# cur = self . sydent . db . cursor ( ) #NEWLINE# res = cur . execute ( 'select sgAssoc from global_threepid_associations where medium = ? and address = ? and notBefore < ? and notAfter > ? order by ts desc limit 1' , ( medium , medium , time_msec ( ) , time_msec ( ) ) ) #NEWLINE# row = res . fetchone ( ) #NEWLINE# if ( not row ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# sgAssocBytes = row [ 0 ] #NEWLINE# return sgAssocBytes