sydent icon indicating copy to clipboard operation
sydent copied to clipboard

/lookup requests don't seem to work

Open anoadragon453 opened this issue 5 years ago • 0 comments

/lookup doesn't seem to work while /bulk_lookup does.

/lookup pulls an sgAssoc from the DB while /bulk_lookup just pulls an MXID associated with a address. An sgAssoc looks like the following:

{
  "address": "[email protected]",
  "medium": "email",
  "mxid": "@ears:matrix.org",
  "not_before": 1428825849161,
  "not_after": 4582425849161,
  "ts": 1428825849161,
  "signatures": {
    "matrix.org": {
      "ed25519:0": "ENiU2YORYUJgE6WBMitU0mppbQjidDLanAusj8XS2nVRHPu+0t42OKA/r6zV6i2MzUbNQ3c3MiLScJuSsOiVDQ"
    }
  }
}

/lookup grabs an assoc from the DB with the following code:

https://github.com/matrix-org/sydent/blob/1a89e424d105968e88d9c8c949ef3a9d9f0cb3be/sydent/http/servlets/lookupservlet.py#L53

Which calls this SQL:

https://github.com/matrix-org/sydent/blob/207531d2c4fce7ded9e1ac76b51098a9327d46ac/sydent/db/threepid_associations.py#L105-L123

My hunch is sgAssocs aren't getting properly added to the DB.

anoadragon453 avatar May 04 '19 00:05 anoadragon453