Signed-off-by: Alex Chen <minecnly@gmail.com>
This commit is contained in:
Cnly 2019-08-07 01:53:52 +08:00
parent f21fdc2bb1
commit ebfbb6d8c2

View file

@ -111,7 +111,7 @@ func GetEvent(
if err != nil { if err != nil {
return httputil.LogThenError(req, err) return httputil.LogThenError(req, err)
} }
if membership == "join" { if membership == gomatrixserverlib.Join {
return util.JSONResponse{ return util.JSONResponse{
Code: http.StatusOK, Code: http.StatusOK,
JSON: gomatrixserverlib.ToClientEvent(r.requestedEvent, gomatrixserverlib.FormatAll), JSON: gomatrixserverlib.ToClientEvent(r.requestedEvent, gomatrixserverlib.FormatAll),
@ -122,6 +122,6 @@ func GetEvent(
return util.JSONResponse{ return util.JSONResponse{
Code: http.StatusNotFound, Code: http.StatusNotFound,
JSON: jsonerror.NotFound("The event was not found or you do not have permission to read this event."), JSON: jsonerror.NotFound("The event was not found or you do not have permission to read this event"),
} }
} }