mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 18:43:10 -06:00
Fix UserID.String()
This commit is contained in:
parent
57f902d604
commit
be632a3487
|
|
@ -101,11 +101,11 @@ func (r *RelayInternalAPI) QueryTransactions(
|
||||||
userID spec.UserID,
|
userID spec.UserID,
|
||||||
previousEntry fclient.RelayEntry,
|
previousEntry fclient.RelayEntry,
|
||||||
) (api.QueryRelayTransactionsResponse, error) {
|
) (api.QueryRelayTransactionsResponse, error) {
|
||||||
logrus.Infof("QueryTransactions for %s", userID.String())
|
logrus.Infof("QueryTransactions for %s", userID.Raw())
|
||||||
if previousEntry.EntryID > 0 {
|
if previousEntry.EntryID > 0 {
|
||||||
logrus.Infof("Cleaning previous entry (%v) from db for %s",
|
logrus.Infof("Cleaning previous entry (%v) from db for %s",
|
||||||
previousEntry.EntryID,
|
previousEntry.EntryID,
|
||||||
userID.String(),
|
userID.Raw(),
|
||||||
)
|
)
|
||||||
prevReceipt := receipt.NewReceipt(previousEntry.EntryID)
|
prevReceipt := receipt.NewReceipt(previousEntry.EntryID)
|
||||||
err := r.db.CleanTransactions(ctx, userID, []*receipt.Receipt{&prevReceipt})
|
err := r.db.CleanTransactions(ctx, userID, []*receipt.Receipt{&prevReceipt})
|
||||||
|
|
@ -123,12 +123,12 @@ func (r *RelayInternalAPI) QueryTransactions(
|
||||||
|
|
||||||
response := api.QueryRelayTransactionsResponse{}
|
response := api.QueryRelayTransactionsResponse{}
|
||||||
if transaction != nil && receipt != nil {
|
if transaction != nil && receipt != nil {
|
||||||
logrus.Infof("Obtained transaction (%v) for %s", transaction.TransactionID, userID.String())
|
logrus.Infof("Obtained transaction (%v) for %s", transaction.TransactionID, userID.Raw())
|
||||||
response.Transaction = *transaction
|
response.Transaction = *transaction
|
||||||
response.EntryID = receipt.GetNID()
|
response.EntryID = receipt.GetNID()
|
||||||
response.EntriesQueued = true
|
response.EntriesQueued = true
|
||||||
} else {
|
} else {
|
||||||
logrus.Infof("No more entries in the queue for %s", userID.String())
|
logrus.Infof("No more entries in the queue for %s", userID.Raw())
|
||||||
response.EntryID = 0
|
response.EntryID = 0
|
||||||
response.EntriesQueued = false
|
response.EntriesQueued = false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ func GetTransactionFromRelay(
|
||||||
relayAPI api.RelayInternalAPI,
|
relayAPI api.RelayInternalAPI,
|
||||||
userID spec.UserID,
|
userID spec.UserID,
|
||||||
) util.JSONResponse {
|
) util.JSONResponse {
|
||||||
logrus.Infof("Processing relay_txn for %s", userID.String())
|
logrus.Infof("Processing relay_txn for %s", userID.Raw())
|
||||||
|
|
||||||
var previousEntry fclient.RelayEntry
|
var previousEntry fclient.RelayEntry
|
||||||
if err := json.Unmarshal(fedReq.Content(), &previousEntry); err != nil {
|
if err := json.Unmarshal(fedReq.Content(), &previousEntry); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ func createQuery(
|
||||||
prevEntry fclient.RelayEntry,
|
prevEntry fclient.RelayEntry,
|
||||||
) fclient.FederationRequest {
|
) fclient.FederationRequest {
|
||||||
var federationPathPrefixV1 = "/_matrix/federation/v1"
|
var federationPathPrefixV1 = "/_matrix/federation/v1"
|
||||||
path := federationPathPrefixV1 + "/relay_txn/" + userID.String()
|
path := federationPathPrefixV1 + "/relay_txn/" + userID.Raw()
|
||||||
request := fclient.NewFederationRequest("GET", userID.Domain(), "relay", path)
|
request := fclient.NewFederationRequest("GET", userID.Domain(), "relay", path)
|
||||||
request.SetContent(prevEntry)
|
request.SetContent(prevEntry)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ func SendTransactionToRelay(
|
||||||
txnID gomatrixserverlib.TransactionID,
|
txnID gomatrixserverlib.TransactionID,
|
||||||
userID spec.UserID,
|
userID spec.UserID,
|
||||||
) util.JSONResponse {
|
) util.JSONResponse {
|
||||||
logrus.Infof("Processing send_relay for %s", userID.String())
|
logrus.Infof("Processing send_relay for %s", userID.Raw())
|
||||||
|
|
||||||
var txnEvents fclient.RelayEvents
|
var txnEvents fclient.RelayEvents
|
||||||
if err := json.Unmarshal(fedReq.Content(), &txnEvents); err != nil {
|
if err := json.Unmarshal(fedReq.Content(), &txnEvents); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ func createFederationRequest(
|
||||||
content interface{},
|
content interface{},
|
||||||
) fclient.FederationRequest {
|
) fclient.FederationRequest {
|
||||||
var federationPathPrefixV1 = "/_matrix/federation/v1"
|
var federationPathPrefixV1 = "/_matrix/federation/v1"
|
||||||
path := federationPathPrefixV1 + "/send_relay/" + string(txnID) + "/" + userID.String()
|
path := federationPathPrefixV1 + "/send_relay/" + string(txnID) + "/" + userID.Raw()
|
||||||
request := fclient.NewFederationRequest("PUT", origin, destination, path)
|
request := fclient.NewFederationRequest("PUT", origin, destination, path)
|
||||||
request.SetContent(content)
|
request.SetContent(content)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue