mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-31 02:33:09 -06:00
Joins and leaves use background context
This commit is contained in:
parent
70920ebdba
commit
faeb61e5a2
|
|
@ -51,7 +51,7 @@ func (r *Joiner) PerformJoin(
|
||||||
req *rsAPI.PerformJoinRequest,
|
req *rsAPI.PerformJoinRequest,
|
||||||
res *rsAPI.PerformJoinResponse,
|
res *rsAPI.PerformJoinResponse,
|
||||||
) {
|
) {
|
||||||
roomID, joinedVia, err := r.performJoin(ctx, req)
|
roomID, joinedVia, err := r.performJoin(context.Background(), req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.WithContext(ctx).WithFields(logrus.Fields{
|
logrus.WithContext(ctx).WithFields(logrus.Fields{
|
||||||
"room_id": req.RoomIDOrAlias,
|
"room_id": req.RoomIDOrAlias,
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ func (r *Leaver) PerformLeave(
|
||||||
return nil, fmt.Errorf("user %q does not belong to this homeserver", req.UserID)
|
return nil, fmt.Errorf("user %q does not belong to this homeserver", req.UserID)
|
||||||
}
|
}
|
||||||
if strings.HasPrefix(req.RoomID, "!") {
|
if strings.HasPrefix(req.RoomID, "!") {
|
||||||
output, err := r.performLeaveRoomByID(ctx, req, res)
|
output, err := r.performLeaveRoomByID(context.Background(), req, res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.WithContext(ctx).WithFields(logrus.Fields{
|
logrus.WithContext(ctx).WithFields(logrus.Fields{
|
||||||
"room_id": req.RoomID,
|
"room_id": req.RoomID,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue