Use const AppServiceDeviceID

This commit is contained in:
Anant Prakash 2018-06-07 19:41:51 +05:30
parent ade99807cf
commit 2a2a4396ec
No known key found for this signature in database
GPG key ID: C5D399F626523045

View file

@ -24,6 +24,7 @@ import (
"net/http"
"strings"
"github.com/matrix-org/dendrite/appservice/types"
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
"github.com/matrix-org/dendrite/clientapi/httputil"
"github.com/matrix-org/dendrite/clientapi/jsonerror"
@ -106,7 +107,7 @@ func VerifyUserFromRequest(
// Create a dummy device for AS user
dev := authtypes.Device{
// Use AS dummy device ID
ID: "AS_Device",
ID: types.AppServiceDeviceID,
// User the AS is masquerading as.
UserID: userID,
// AS dummy device has AS's token.