Allow knocking rooms (#11353)
Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
This commit is contained in:
parent
e6af09e424
commit
5152aad059
18 changed files with 689 additions and 7 deletions
24
src/dispatcher/payloads/CancelAskToJoinPayload.ts
Normal file
24
src/dispatcher/payloads/CancelAskToJoinPayload.ts
Normal 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;
|
||||
}
|
|
@ -24,4 +24,6 @@ export interface JoinRoomErrorPayload extends Pick<ActionPayload, "action"> {
|
|||
|
||||
roomId: string;
|
||||
err: MatrixError;
|
||||
|
||||
canAskToJoin?: boolean;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
27
src/dispatcher/payloads/SubmitAskToJoinPayload.ts
Normal file
27
src/dispatcher/payloads/SubmitAskToJoinPayload.ts
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue