mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-22 13:24:58 -05:00
Rename column to attestation_json
This commit is contained in:
parent
0aac30d53b
commit
e52c391cd4
@ -168,7 +168,7 @@ class GroupServerStore(SQLBaseStore):
|
|||||||
"group_id": group_id,
|
"group_id": group_id,
|
||||||
"user_id": user_id,
|
"user_id": user_id,
|
||||||
"valid_until_ms": remote_attestation["valid_until_ms"],
|
"valid_until_ms": remote_attestation["valid_until_ms"],
|
||||||
"attestation": json.dumps(remote_attestation),
|
"attestation_json": json.dumps(remote_attestation),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -278,7 +278,7 @@ class GroupServerStore(SQLBaseStore):
|
|||||||
},
|
},
|
||||||
updatevalues={
|
updatevalues={
|
||||||
"valid_until_ms": attestation["valid_until_ms"],
|
"valid_until_ms": attestation["valid_until_ms"],
|
||||||
"attestation": json.dumps(attestation)
|
"attestation_json": json.dumps(attestation)
|
||||||
},
|
},
|
||||||
desc="update_remote_attestion",
|
desc="update_remote_attestion",
|
||||||
)
|
)
|
||||||
@ -294,13 +294,13 @@ class GroupServerStore(SQLBaseStore):
|
|||||||
"group_id": group_id,
|
"group_id": group_id,
|
||||||
"user_id": user_id,
|
"user_id": user_id,
|
||||||
},
|
},
|
||||||
retcols=("valid_until_ms", "attestation"),
|
retcols=("valid_until_ms", "attestation_json"),
|
||||||
desc="get_remote_attestation",
|
desc="get_remote_attestation",
|
||||||
allow_none=True,
|
allow_none=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
now = int(self._clock.time_msec())
|
now = int(self._clock.time_msec())
|
||||||
if row and now < row["valid_until_ms"]:
|
if row and now < row["valid_until_ms"]:
|
||||||
defer.returnValue(json.loads(row["attestation"]))
|
defer.returnValue(json.loads(row["attestation_json"]))
|
||||||
|
|
||||||
defer.returnValue(None)
|
defer.returnValue(None)
|
||||||
|
@ -73,7 +73,7 @@ CREATE TABLE group_attestations_remote (
|
|||||||
group_id TEXT NOT NULL,
|
group_id TEXT NOT NULL,
|
||||||
user_id TEXT NOT NULL,
|
user_id TEXT NOT NULL,
|
||||||
valid_until_ms BIGINT NOT NULL,
|
valid_until_ms BIGINT NOT NULL,
|
||||||
attestation TEXT NOT NULL
|
attestation_json TEXT NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX group_attestations_remote_g_idx ON group_attestations_remote(group_id, user_id);
|
CREATE INDEX group_attestations_remote_g_idx ON group_attestations_remote(group_id, user_id);
|
||||||
|
Loading…
Reference in New Issue
Block a user