MCPcopy Create free account
hub / github.com/daodst/chat / parseEventIDParam

Function parseEventIDParam

federationapi/routing/state.go:76–95  ·  view source on GitHub ↗
(
	request *gomatrixserverlib.FederationRequest,
)

Source from the content-addressed store, hash-verified

74}
75
76func parseEventIDParam(
77 request *gomatrixserverlib.FederationRequest,
78) (eventID string, resErr *util.JSONResponse) {
79 URL, err := url.Parse(request.RequestURI())
80 if err != nil {
81 response := util.ErrorResponse(err)
82 resErr = &response
83 return
84 }
85
86 eventID = URL.Query().Get("event_id")
87 if eventID == "" {
88 resErr = &util.JSONResponse{
89 Code: http.StatusBadRequest,
90 JSON: jsonerror.MissingArgument("event_id missing"),
91 }
92 }
93
94 return
95}
96
97func getState(
98 ctx context.Context,

Callers 2

GetStateFunction · 0.85
GetStateIDsFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected