Allow knocking rooms (#11353)

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
This commit is contained in:
Charly Nguyen 2023-08-07 08:27:09 +02:00 committed by GitHub
parent e6af09e424
commit 5152aad059
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 689 additions and 7 deletions

View file

@ -0,0 +1,24 @@
/*
Copyright 2023 Nordeck IT + Consulting GmbH
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Action } from "../actions";
import { ActionPayload } from "../payloads";
export interface CancelAskToJoinPayload extends Pick<ActionPayload, "action"> {
action: Action.CancelAskToJoin;
roomId: string;
}

View file

@ -24,4 +24,6 @@ export interface JoinRoomErrorPayload extends Pick<ActionPayload, "action"> {
roomId: string;
err: MatrixError;
canAskToJoin?: boolean;
}

View file

@ -29,5 +29,7 @@ export interface JoinRoomPayload extends Pick<ActionPayload, "action"> {
// additional parameters for the purpose of metrics & instrumentation
metricsTrigger: JoinedRoomEvent["trigger"];
canAskToJoin?: boolean;
}
/* eslint-enable camelcase */

View file

@ -0,0 +1,27 @@
/*
Copyright 2023 Nordeck IT + Consulting GmbH
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { KnockRoomOpts } from "matrix-js-sdk/src/@types/requests";
import { Action } from "../actions";
import { ActionPayload } from "../payloads";
export interface SubmitAskToJoinPayload extends Pick<ActionPayload, "action"> {
action: Action.SubmitAskToJoin;
roomId: string;
opts?: KnockRoomOpts;
}