mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 03:43:11 -06:00
Remove file accidentally added from working tree
This commit is contained in:
parent
a2b5b328cf
commit
aa3c9f0976
|
|
@ -1,59 +0,0 @@
|
|||
package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
commonHTTP "github.com/matrix-org/dendrite/common/http"
|
||||
"github.com/opentracing/opentracing-go"
|
||||
)
|
||||
|
||||
const (
|
||||
// RoomserverPerformJoinRequestPath is the HTTP path for the PerformJoinRequest API.
|
||||
RoomserverPerformJoinRequestPath = "/api/roomserver/performJoin"
|
||||
|
||||
// RoomserverPerformLeaveRequestPath is the HTTP path for the PerformLeaveRequest API.
|
||||
RoomserverPerformLeaveRequestPath = "/api/roomserver/performLeave"
|
||||
)
|
||||
|
||||
type PerformJoinRequest struct {
|
||||
RoomID string `json:"room_id"`
|
||||
UserID string `json:"user_id"`
|
||||
Content map[string]interface{} `json:"content"`
|
||||
}
|
||||
|
||||
type PerformJoinResponse struct {
|
||||
}
|
||||
|
||||
// Handle an instruction to make_join & send_join with a remote server.
|
||||
func (h *httpRoomserverInternalAPI) PerformJoin(
|
||||
ctx context.Context,
|
||||
request *PerformJoinRequest,
|
||||
response *PerformJoinResponse,
|
||||
) error {
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "PerformJoinRequest")
|
||||
defer span.Finish()
|
||||
|
||||
apiURL := h.roomserverURL + RoomserverPerformJoinRequestPath
|
||||
return commonHTTP.PostJSON(ctx, span, h.httpClient, apiURL, request, response)
|
||||
}
|
||||
|
||||
type PerformLeaveRequest struct {
|
||||
RoomID string `json:"room_id"`
|
||||
UserID string `json:"user_id"`
|
||||
}
|
||||
|
||||
type PerformLeaveResponse struct {
|
||||
}
|
||||
|
||||
// Handle an instruction to make_leave & send_leave with a remote server.
|
||||
func (h *httpRoomserverInternalAPI) PerformLeave(
|
||||
ctx context.Context,
|
||||
request *PerformLeaveRequest,
|
||||
response *PerformLeaveResponse,
|
||||
) error {
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "PerformLeaveRequest")
|
||||
defer span.Finish()
|
||||
|
||||
apiURL := h.roomserverURL + RoomserverPerformLeaveRequestPath
|
||||
return commonHTTP.PostJSON(ctx, span, h.httpClient, apiURL, request, response)
|
||||
}
|
||||
Loading…
Reference in a new issue