Skip to content

Commit 5719ec5

Browse files
committed
fix: transaction API, return an empty object
This is what Matrix server expects: https://spec.matrix.org/v1.12/application-service-api/#put_matrixappv1transactionstxnid
1 parent 1a6a817 commit 5719ec5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/routes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,6 @@ func (h handler) matrixAppTransaction(c echo.Context) error {
225225

226226
logger.Debug().Str("endpoint", "matrix_app_transaction").Str("txn_id", txnId).Str("payload", string(bodyBytes)).Msg("received application service transaction")
227227

228-
// As per spec, simply acknowledge with 200 OK.
229-
return c.NoContent(http.StatusOK)
228+
// As per spec, acknowledge with an empty JSON object and 200 OK.
229+
return c.JSON(http.StatusOK, map[string]interface{}{})
230230
}

0 commit comments

Comments
 (0)