mirror of
https://github.com/the-draupnir-project/Draupnir.git
synced 2026-10-23 09:22:24 +00:00
Update for new MPS handleExternalInvite handle.
This commit is contained in:
1 parent
771edf387e
commit
d1950fbb54
3 files changed
+15
-12
No files matched your search
+2
-2
@@ -63,8 +63,8 @@
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsdom": "^24.0.0",
|
||||
"matrix-appservice-bridge": "^9.0.1",
|
||||
"matrix-protection-suite": "npm:@gnuxie/matrix-protection-suite@0.20.0",
|
||||
"matrix-protection-suite-for-matrix-bot-sdk": "npm:@gnuxie/matrix-protection-suite-for-matrix-bot-sdk@0.20.0",
|
||||
"matrix-protection-suite": "npm:@gnuxie/matrix-protection-suite@0.21.0",
|
||||
"matrix-protection-suite-for-matrix-bot-sdk": "npm:@gnuxie/matrix-protection-suite-for-matrix-bot-sdk@0.21.0",
|
||||
"parse-duration": "^1.0.2",
|
||||
"pg": "^8.8.0",
|
||||
"shell-quote": "^1.7.3",
|
||||
|
||||
+5
-2
@@ -199,7 +199,10 @@ export class Draupnir implements Client {
|
||||
}
|
||||
|
||||
public handleTimelineEvent(roomID: StringRoomID, event: RoomEvent): void {
|
||||
Task(this.joinOnInviteListener(roomID, event));
|
||||
if (Value.Check(MembershipEvent, event) && event.content.membership === Membership.Invite && event.state_key === this.clientUserID) {
|
||||
this.protectedRoomsSet.handleExternalInvite(roomID, event);
|
||||
Task(this.joinOnInviteListener(roomID, event));
|
||||
}
|
||||
this.managementRoomMessageListener(roomID, event);
|
||||
this.reactionHandler.handleEvent(roomID, event);
|
||||
if (this.protectedRoomsSet.isProtectedRoom(roomID)) {
|
||||
@@ -250,7 +253,7 @@ export class Draupnir implements Client {
|
||||
* @param {boolean} options.autojoinOnlyIfManager Whether to only accept an invitation by a user present in the `managementRoom`.
|
||||
* @param {string} options.acceptInvitesFromSpace A space of users to accept invites from, ignores invites form users not in this space.
|
||||
*/
|
||||
private async joinOnInviteListener(roomID: StringRoomID, event: RoomEvent): Promise<void> {
|
||||
private async joinOnInviteListener(roomID: StringRoomID, event: MembershipEvent): Promise<void> {
|
||||
if (Value.Check(MembershipEvent, event) && event.state_key === this.clientUserID) {
|
||||
const inviteEvent = event;
|
||||
const reportInvite = async () => {
|
||||
|
||||
@@ -2505,15 +2505,15 @@ matrix-appservice@^2.0.0:
|
||||
request-promise "^4.2.6"
|
||||
sanitize-html "^2.8.0"
|
||||
|
||||
"matrix-protection-suite-for-matrix-bot-sdk@npm:@gnuxie/matrix-protection-suite-for-matrix-bot-sdk@0.20.0":
|
||||
version "0.20.0"
|
||||
resolved "https://registry.yarnpkg.com/@gnuxie/matrix-protection-suite-for-matrix-bot-sdk/-/matrix-protection-suite-for-matrix-bot-sdk-0.20.0.tgz#c103fc6f66c14606c669f6e71de8049acf504b2b"
|
||||
integrity sha512-HA85a64+2TqvgSY2us8wKBb7NoeAoeLBiIMf8btBVCJXppED+oiPxSdwsSy6nZmcWxgNUt1SEvlmhlUCm5EJGg==
|
||||
"matrix-protection-suite-for-matrix-bot-sdk@npm:@gnuxie/matrix-protection-suite-for-matrix-bot-sdk@0.21.0":
|
||||
version "0.21.0"
|
||||
resolved "https://registry.yarnpkg.com/@gnuxie/matrix-protection-suite-for-matrix-bot-sdk/-/matrix-protection-suite-for-matrix-bot-sdk-0.21.0.tgz#2b03a1409e01508635d31c9e0f7d3650d48467de"
|
||||
integrity sha512-wRcNYrY8gDxX6ofPjRpE5DI+i+X0q5o2VqFXXYA2TSiYCues0B26DZeRH5qcw8pmMM+voCGSPurLD7RFnm1a8Q==
|
||||
|
||||
"matrix-protection-suite@npm:@gnuxie/matrix-protection-suite@0.20.0":
|
||||
version "0.20.0"
|
||||
resolved "https://registry.yarnpkg.com/@gnuxie/matrix-protection-suite/-/matrix-protection-suite-0.20.0.tgz#a1ed3a7a2c1ac9bcda870d2c035f165ff2fe376d"
|
||||
integrity sha512-CHGhyVfmG7Jn8SsxYlvqfFxs5Fyhv0fCP3RVht5pzhErYlvjsdphBRNrkzmq87kNBOJo9kGQ8HWFhxOaU5GCkA==
|
||||
"matrix-protection-suite@npm:@gnuxie/matrix-protection-suite@0.21.0":
|
||||
version "0.21.0"
|
||||
resolved "https://registry.yarnpkg.com/@gnuxie/matrix-protection-suite/-/matrix-protection-suite-0.21.0.tgz#9f4983cf1a2a6583f7d9ee6ea84fc4428f9add6b"
|
||||
integrity sha512-hIZpkIv0bEl5aKMv/AzK9Lcbg6CD3lw5VDYQmv04pM2/ja4z5nCsxD9rWeEUl+1IP+i0RjFWLNnbhl8n9nPsnA==
|
||||
dependencies:
|
||||
await-lock "^2.2.2"
|
||||
crypto-js "^4.2.0"
|
||||
|
||||
Reference in new issue
Block a user