diff --git a/src/github.com/matrix-org/dendrite/clientapi/routing/room_tagging.go b/src/github.com/matrix-org/dendrite/clientapi/routing/room_tagging.go index 7cec71c46..2513077cb 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/routing/room_tagging.go +++ b/src/github.com/matrix-org/dendrite/clientapi/routing/room_tagging.go @@ -41,17 +41,21 @@ func GetTag(req *http.Request, userId string, roomId string) util.JSONResponse { } } + mtag := NewMTag() + data, err := accountDB.GetAccountDataByType( req.Context(), localpart, "ROOM_ID", "m.tag", ) + json.Unmarshal([]byte(data), &mtag) + if err != nil { return httputil.LogThenError(req, err) } return util.JSONResponse{ Code: http.StatusOK, - JSON: tags, + JSON: mtag, } }