;
}
if (sendResult.ok[0] === undefined) {
- throw new TypeError(`We exepct to have sent at least one event`);
+ throw new TypeError(`We expect to have sent at least one event`);
}
return await reactionHandler
.addReactionsToEvent(client, roomIDToUse, sendResult.ok[0], reactionMap)
diff --git a/src/commands/server-admin/DeactivateCommand.tsx b/src/commands/server-admin/DeactivateCommand.tsx
index 1274af85..e7b54d7e 100644
--- a/src/commands/server-admin/DeactivateCommand.tsx
+++ b/src/commands/server-admin/DeactivateCommand.tsx
@@ -104,7 +104,7 @@ export const SynapseAdminDeactivateCommand = describeCommand({
);
} else if (!details.ok) {
return ResultError.Result(
- `Couldn't find a residident user with the ID ${targetUser.toString()}`
+ `Couldn't find a resident user with the ID ${targetUser.toString()}`
);
}
return Ok({
diff --git a/src/commands/server-admin/ShutdownRoomCommand.ts b/src/commands/server-admin/ShutdownRoomCommand.ts
index b2f82dff..d4a23a4f 100644
--- a/src/commands/server-admin/ShutdownRoomCommand.ts
+++ b/src/commands/server-admin/ShutdownRoomCommand.ts
@@ -63,7 +63,7 @@ export const SynapseAdminShutdownRoomCommand = describeCommand({
return resolvedRoom;
}
const reason = reasonParts.join(" ");
- // we use delte V1 because clients do not pick up the user's own leave event
+ // we use delete V1 because clients do not pick up the user's own leave event
// in V2 and i don't know why.
// That is very important in the case of stuck invitations.
return await draupnir.synapseAdminClient.deleteRoom(
diff --git a/src/commands/server-admin/Takedown.tsx b/src/commands/server-admin/Takedown.tsx
index b62915c8..e3c6e881 100644
--- a/src/commands/server-admin/Takedown.tsx
+++ b/src/commands/server-admin/Takedown.tsx
@@ -119,7 +119,7 @@ export type TakedownPolicyPreview = {
export const DraupnirTakedownCommand = describeCommand({
summary:
- "Mark an entity for takedown. This command is used to mark illegal or intollerable content as takedown. This is the strongest of consequences and is usualy irreversable.\
+ "Mark an entity for takedown. This command is used to mark illegal or intolerable content as takedown. This is the strongest of consequences and is usually irreversible.\
This can be used to block rooms on your homeserver and discard spam invitations.",
parameters: tuple(
{
@@ -277,7 +277,7 @@ function renderTakedownPreview(preview: TakedownPolicyPreview): DocumentNode {
policy room: {renderRoomPill(preview.policyRoom)}
- Please consider that doing so may have irreversable effects.
+ Please consider that doing so may have irreversible effects.
You MUST only use takedown policies to mark spam, illegal, or
diff --git a/src/commands/server-admin/UnrestrictCommand.tsx b/src/commands/server-admin/UnrestrictCommand.tsx
index c6e3eec4..5bc3f124 100644
--- a/src/commands/server-admin/UnrestrictCommand.tsx
+++ b/src/commands/server-admin/UnrestrictCommand.tsx
@@ -13,7 +13,7 @@ import { Result, ResultError } from "@gnuxie/typescript-result";
import { SynapseAdminUserSuspensionCapability } from "../../protections/HomeserverUserPolicyApplication/UserSuspensionCapability";
import { DraupnirInterfaceAdaptor } from "../DraupnirCommandPrerequisites";
-export const SynpaseAdminUnrestrictUserCommand = describeCommand({
+export const SynapseAdminUnrestrictUserCommand = describeCommand({
summary:
"Unrestrict a user on the homeserver if their account has been suspended or shadowbanned",
parameters: tuple({
@@ -47,6 +47,6 @@ export const SynpaseAdminUnrestrictUserCommand = describeCommand({
},
});
-DraupnirInterfaceAdaptor.describeRenderer(SynpaseAdminUnrestrictUserCommand, {
+DraupnirInterfaceAdaptor.describeRenderer(SynapseAdminUnrestrictUserCommand, {
isAlwaysSupposedToUseDefaultRenderer: true,
});
diff --git a/src/commands/unban/Unban.tsx b/src/commands/unban/Unban.tsx
index d5c16c94..982bf334 100644
--- a/src/commands/unban/Unban.tsx
+++ b/src/commands/unban/Unban.tsx
@@ -75,7 +75,7 @@ export type UnbanMembersPreview = UnbanEntityPreview & {
readonly membersToUnban: MemberRooms[];
};
-// The idea is to to only diplay these if at least one result failed.
+// The idea is to to only display these if at least one result failed.
export type UnbanMembersResult = UnbanMembersPreview & {
readonly policyRemovalResult: RoomSetResult;
readonly usersUnbanned: ResultForUsersInSet;
diff --git a/src/commands/unban/UnbanUsers.tsx b/src/commands/unban/UnbanUsers.tsx
index 6778a152..0edc553d 100644
--- a/src/commands/unban/UnbanUsers.tsx
+++ b/src/commands/unban/UnbanUsers.tsx
@@ -278,7 +278,7 @@ export function findUnbanInformationForMember(
) {
literalsToScan.push(match.entity);
}
- // HashedLiterals that match will be removed indriectly when their sourceEvent's
+ // HashedLiterals that match will be removed indirectly when their sourceEvent's
// get removed.
}
}
@@ -302,7 +302,7 @@ export function findUnbanInformationForMember(
).length > 0
);
};
- // Now we need to filter out only members that are completly free of policies.
+ // Now we need to filter out only members that are completely free of policies.
const membersToUnban = membersMatchingPoliciesAndEntity.filter(
(member) => !isMemberStillBannedAfterPolicyRemoval(member)
);
diff --git a/src/draupnirfactory/DraupnirFactory.ts b/src/draupnirfactory/DraupnirFactory.ts
index 784d0c7c..afe08be1 100644
--- a/src/draupnirfactory/DraupnirFactory.ts
+++ b/src/draupnirfactory/DraupnirFactory.ts
@@ -133,7 +133,7 @@ export class DraupnirFactory {
managementRoomMembership.ok,
managementRoomState.ok
);
- // synapesHTTPAntispam is made here so that the listeners get destroyed
+ // synapseHTTPAntispam is made here so that the listeners get destroyed
// when draupnir is destroyed.
const synapseHTTPAntispam = config.web.synapseHTTPAntispam.enabled
? new SynapseHttpAntispam(config.web.synapseHTTPAntispam.authorization)
diff --git a/src/draupnirfactory/StandardDraupnirManager.ts b/src/draupnirfactory/StandardDraupnirManager.ts
index adb17b89..513090ac 100644
--- a/src/draupnirfactory/StandardDraupnirManager.ts
+++ b/src/draupnirfactory/StandardDraupnirManager.ts
@@ -165,12 +165,12 @@ export class StandardDraupnirManager {
return safeModeDraupnir;
}
- private isNormalDraupnir(drapunirClientID: StringUserID): boolean {
- return this.draupnir.has(drapunirClientID);
+ private isNormalDraupnir(draupnirClientID: StringUserID): boolean {
+ return this.draupnir.has(draupnirClientID);
}
- private isSafeModeDraupnir(drapunirClientID: StringUserID): boolean {
- return this.safeModeDraupnir.has(drapunirClientID);
+ private isSafeModeDraupnir(draupnirClientID: StringUserID): boolean {
+ return this.safeModeDraupnir.has(draupnirClientID);
}
/**
diff --git a/src/managementroom/ManagementRoomOutput.ts b/src/managementroom/ManagementRoomOutput.ts
index 79c64cc9..cadfa237 100644
--- a/src/managementroom/ManagementRoomOutput.ts
+++ b/src/managementroom/ManagementRoomOutput.ts
@@ -58,7 +58,7 @@ export interface ManagementRoomOutput {
}
/**
- * Allows the different componenets of draupnir to send messages back to the management room without introducing a dependency on the entirity of a `Draupnir` instance.
+ * Allows the different components of draupnir to send messages back to the management room without introducing a dependency on the entirety of a `Draupnir` instance.
*/
export default class StandardManagementRoomOutput
implements ManagementRoomOutput
diff --git a/src/models/RoomUpdateError.tsx b/src/models/RoomUpdateError.tsx
index a796b2e3..a58677cf 100644
--- a/src/models/RoomUpdateError.tsx
+++ b/src/models/RoomUpdateError.tsx
@@ -37,8 +37,8 @@ function renderErrorItem(error: RoomUpdateError): DocumentNode {
* @param errors Any errors associated with the action.
* @param options.title To give context about what the action was, shown when there are errors.
* @param options.noErrorsText To show when there are no errors.
- * @param options.skipNoErrors is ineffective and does nothing, it is an option for the accompnying `printActionResult`.
- * @returns A `DocumentNode` fragment that can be sent to Matrix or incorperated into another message.
+ * @param options.skipNoErrors is ineffective and does nothing, it is an option for the accompanying `printActionResult`.
+ * @returns A `DocumentNode` fragment that can be sent to Matrix or incorporated into another message.
*/
export async function renderActionResult(
errors: RoomUpdateError[],
diff --git a/src/protections/BanPropagation.tsx b/src/protections/BanPropagation.tsx
index 88823f68..82b2a966 100644
--- a/src/protections/BanPropagation.tsx
+++ b/src/protections/BanPropagation.tsx
@@ -336,10 +336,16 @@ describeProtection({
defaultCapabilities: {
userConsequences: "StandardUserConsequences",
},
- factory: (decription, protectedRoomsSet, draupnir, capabilities, _settings) =>
+ factory: (
+ description,
+ protectedRoomsSet,
+ draupnir,
+ capabilities,
+ _settings
+ ) =>
Ok(
new BanPropagationProtection(
- decription,
+ description,
capabilities,
protectedRoomsSet,
draupnir
diff --git a/src/protections/BlockInvitationsOnServerProtection.tsx b/src/protections/BlockInvitationsOnServerProtection.tsx
index ef3ef38c..470aaff5 100644
--- a/src/protections/BlockInvitationsOnServerProtection.tsx
+++ b/src/protections/BlockInvitationsOnServerProtection.tsx
@@ -152,7 +152,7 @@ export class BlockInvitationsOnServerProtection
describeProtection({
name: BlockInvitationsOnServerProtection.name,
description:
- "Blocks invitations from users marked as takedown or have bans matching the the configured automaticallyRedactForReasons",
+ "Blocks invitations from users marked as takedown or have bans matching the configured automaticallyRedactForReasons",
capabilityInterfaces: {},
defaultCapabilities: {},
factory(description, protectedRoomsSet, draupnir, capabilities, _settings) {
diff --git a/src/protections/DraupnirProtectionsIndex.ts b/src/protections/DraupnirProtectionsIndex.ts
index ac14907a..33d6ed65 100644
--- a/src/protections/DraupnirProtectionsIndex.ts
+++ b/src/protections/DraupnirProtectionsIndex.ts
@@ -4,7 +4,7 @@
/**
* This file exists as a way to register all protections.
- * In future, we should maybe try to dogfood the dynamic plugin load sytem
+ * In future, we should maybe try to dogfood the dynamic plugin load system
* instead. For now that system doesn't even exist.
*/
diff --git a/src/protections/HomeserverUserPolicyApplication/HomeserverUserPolicyApplication.ts b/src/protections/HomeserverUserPolicyApplication/HomeserverUserPolicyApplication.ts
index 3efe721e..d4e058b4 100644
--- a/src/protections/HomeserverUserPolicyApplication/HomeserverUserPolicyApplication.ts
+++ b/src/protections/HomeserverUserPolicyApplication/HomeserverUserPolicyApplication.ts
@@ -42,7 +42,7 @@ export class HomeserverUserPolicyApplication {
// nothing to do.
}
- private isPolicyElegiableForRestriction(policy: LiteralPolicyRule): boolean {
+ private isPolicyEligibleForRestriction(policy: LiteralPolicyRule): boolean {
if (policy.kind !== PolicyRuleType.User) {
return false;
}
@@ -127,7 +127,7 @@ export class HomeserverUserPolicyApplication {
if (policy.matchType !== PolicyRuleMatchType.Literal) {
continue;
}
- if (!this.isPolicyElegiableForRestriction(policy)) {
+ if (!this.isPolicyEligibleForRestriction(policy)) {
continue;
}
const isUserRestricted = await this.consequences.isUserRestricted(
@@ -141,7 +141,7 @@ export class HomeserverUserPolicyApplication {
} else if (isUserRestricted.ok) {
continue; // user is already suspended
}
- // FIXME: Takedown policie should really automatically deactivate
+ // FIXME: Takedown policy should really automatically deactivate
// after a grace period or something.
if (
this.automaticallyRedactForReasons.some(
@@ -182,9 +182,9 @@ export class HomeserverUserPolicyApplication {
// in the background too.
void Task(
(async () => {
- log.debug("Findind local users to suspend at protection enable...");
+ log.debug("Finding local users to suspend at protection enable...");
const revision = this.watchedPolicyRooms.currentRevision;
- // FIXME: We need to also paginate through all supsended, shadowbanned, and locked
+ // FIXME: We need to also paginate through all suspended, shadowbanned, and locked
// users to see if they have a matching policy and recommend that they either
// be deactivated or have their restrictions lifted.
// probably something for another component of the protection to do.
diff --git a/src/protections/HomeserverUserPolicyApplication/HomeserverUserPurgingDeactivate.ts b/src/protections/HomeserverUserPolicyApplication/HomeserverUserPurgingDeactivate.ts
index d14427c5..7488bd00 100644
--- a/src/protections/HomeserverUserPolicyApplication/HomeserverUserPurgingDeactivate.ts
+++ b/src/protections/HomeserverUserPolicyApplication/HomeserverUserPurgingDeactivate.ts
@@ -72,7 +72,7 @@ export class HomeserverUserPurgingDeactivate {
);
}
// We make sure we have shadow banned their account while we redact.
- // This is to make sure they don't send anymore while we decomission the account.
+ // This is to make sure they don't send anymore while we decommission the account.
if (!userDetails.ok || !isUserAccountRestricted(userDetails.ok)) {
const shadowBanResult =
await this.synapseAdminClient.shadowBanUser(userID);
diff --git a/src/protections/HomeserverUserPolicyApplication/UserRestrictionAuditLog.ts b/src/protections/HomeserverUserPolicyApplication/UserRestrictionAuditLog.ts
index f0fb6679..a8b4022e 100644
--- a/src/protections/HomeserverUserPolicyApplication/UserRestrictionAuditLog.ts
+++ b/src/protections/HomeserverUserPolicyApplication/UserRestrictionAuditLog.ts
@@ -18,7 +18,7 @@ export interface UserRestrictionAuditLog {
}
): Promise>;
recordExistingUserRestriction(
- uesrID: StringUserID,
+ userID: StringUserID,
restriction: AccountRestriction
): Promise>;
unrestrictUser(
diff --git a/src/protections/JoinWaveShortCircuit.tsx b/src/protections/JoinWaveShortCircuit.tsx
index 79754f9c..ac177511 100644
--- a/src/protections/JoinWaveShortCircuit.tsx
+++ b/src/protections/JoinWaveShortCircuit.tsx
@@ -144,7 +144,7 @@ export class JoinWaveShortCircuitProtection
const roomID = revision.room.toRoomIDOrAlias();
for (const change of changes) {
await this.handleMembership(roomID, change).catch((e: unknown) => {
- log.error(`Unexpected error handling memebership change`, e);
+ log.error(`Unexpected error handling membership change`, e);
});
}
return Ok(undefined);
diff --git a/src/protections/MembershipChangeProtection.tsx b/src/protections/MembershipChangeProtection.tsx
index 07d528e3..409e1b46 100644
--- a/src/protections/MembershipChangeProtection.tsx
+++ b/src/protections/MembershipChangeProtection.tsx
@@ -194,10 +194,16 @@ describeProtection<
finalConsequences: "StandardUserConsequences",
},
configSchema: MembershipChangeProtectionSettings,
- factory: (decription, protectedRoomsSet, draupnir, capabilitySet, settings) =>
+ factory: (
+ description,
+ protectedRoomsSet,
+ draupnir,
+ capabilitySet,
+ settings
+ ) =>
Ok(
new MembershipChangeProtection(
- decription,
+ description,
capabilitySet,
protectedRoomsSet,
draupnir.clientPlatform.toRoomMessageSender(),
diff --git a/src/protections/MentionLimitProtection.tsx b/src/protections/MentionLimitProtection.tsx
index 2af6324b..d51b5b75 100644
--- a/src/protections/MentionLimitProtection.tsx
+++ b/src/protections/MentionLimitProtection.tsx
@@ -203,7 +203,7 @@ describeProtection<
typeof MentionLimitProtectionSettings
>({
name: "MentionLimitProtection",
- description: `A potection that will remove any messages with
+ description: `A protection that will remove any messages with
a number of mentions over a preconfigured limit.
Please read the documentation https://the-draupnir-project.github.io/draupnir-documentation/protections/mention-limit-protection.`,
capabilityInterfaces: {
@@ -215,10 +215,16 @@ describeProtection<
userConsequences: "StandardUserConsequences",
},
configSchema: MentionLimitProtectionSettings,
- factory: (decription, protectedRoomsSet, draupnir, capabilitySet, settings) =>
+ factory: (
+ description,
+ protectedRoomsSet,
+ draupnir,
+ capabilitySet,
+ settings
+ ) =>
Ok(
new MentionLimitProtection(
- decription,
+ description,
capabilitySet,
draupnir.clientPlatform.toRoomMessageSender(),
protectedRoomsSet,
diff --git a/src/protections/NewJoinerProtection.ts b/src/protections/NewJoinerProtection.ts
index 07942122..7065993c 100644
--- a/src/protections/NewJoinerProtection.ts
+++ b/src/protections/NewJoinerProtection.ts
@@ -96,10 +96,10 @@ describeProtection({
defaultCapabilities: {
userConsequences: "StandardUserConsequences",
},
- factory: (decription, protectedRoomsSet, draupnir, capabilitySet) =>
+ factory: (description, protectedRoomsSet, draupnir, capabilitySet) =>
Ok(
new NewJoinerProtection(
- decription,
+ description,
capabilitySet,
protectedRoomsSet,
draupnir.config
diff --git a/src/protections/PolicyChangeNotification.tsx b/src/protections/PolicyChangeNotification.tsx
index 3fca8b6c..740dcf69 100644
--- a/src/protections/PolicyChangeNotification.tsx
+++ b/src/protections/PolicyChangeNotification.tsx
@@ -43,13 +43,13 @@ import { renderRuleHashes, renderRuleClearText } from "../commands/Rules";
const log = new Logger("PolicyChangeNotification");
-export type PolicyChangeNotificationCapabilitites = Record;
+export type PolicyChangeNotificationCapabilities = Record;
export type PolicyChangeNotificationProtectionDescription =
ProtectionDescription<
Draupnir,
UnknownConfig,
- PolicyChangeNotificationCapabilitites
+ PolicyChangeNotificationCapabilities
>;
type ChangesByRoomID = Map;
@@ -60,7 +60,7 @@ export class PolicyChangeNotification
{
constructor(
description: PolicyChangeNotificationProtectionDescription,
- capabilities: PolicyChangeNotificationCapabilitites,
+ capabilities: PolicyChangeNotificationCapabilities,
protectedRoomsSet: ProtectedRoomsSet,
private readonly draupnir: Draupnir
) {
@@ -159,7 +159,7 @@ function renderGroupedChanges(groupedChanges: GroupedChange[]): DocumentNode {
return {groupedChanges.map(renderListChanges)};
}
-describeProtection({
+describeProtection({
name: PolicyChangeNotification.name,
description: "Provides notification of policy changes from watched lists.",
capabilityInterfaces: {},
diff --git a/src/protections/ProtectedRooms/ProtectJoinedRooms.tsx b/src/protections/ProtectedRooms/ProtectJoinedRooms.tsx
index 0d927d19..317c9aa9 100644
--- a/src/protections/ProtectedRooms/ProtectJoinedRooms.tsx
+++ b/src/protections/ProtectedRooms/ProtectJoinedRooms.tsx
@@ -105,7 +105,7 @@ export class ProtectedJoinedRooms {
{}
),
{
- description: "Report newly protected rooms to the managmeent room.",
+ description: "Report newly protected rooms to the management room.",
}
);
}
diff --git a/src/protections/ProtectedRooms/RoomsSetBehaviourProtection.tsx b/src/protections/ProtectedRooms/RoomsSetBehaviourProtection.tsx
index 14dba437..09273cbc 100644
--- a/src/protections/ProtectedRooms/RoomsSetBehaviourProtection.tsx
+++ b/src/protections/ProtectedRooms/RoomsSetBehaviourProtection.tsx
@@ -19,13 +19,13 @@ import { ProtectedJoinedRooms } from "./ProtectJoinedRooms";
import { UnprotectPartedRooms } from "./UnprotectPartedRooms";
import { StringRoomID } from "@the-draupnir-project/matrix-basic-types";
-export type RoomsSetBehaviourCapabailities = Record;
+export type RoomsSetBehaviourCapabilities = Record;
export type RoomsSetBehaviourSettings = UnknownConfig;
export type RoomsSetBehaviourDescription = ProtectionDescription<
Draupnir,
RoomsSetBehaviourSettings,
- RoomsSetBehaviourCapabailities
+ RoomsSetBehaviourCapabilities
>;
export class RoomsSetBehaviour
@@ -47,7 +47,7 @@ export class RoomsSetBehaviour
);
public constructor(
description: RoomsSetBehaviourDescription,
- capabilities: RoomsSetBehaviourCapabailities,
+ capabilities: RoomsSetBehaviourCapabilities,
protectedRoomsSet: ProtectedRoomsSet,
private readonly draupnir: Draupnir
) {
@@ -80,7 +80,7 @@ export class RoomsSetBehaviour
}
}
-describeProtection({
+describeProtection({
name: RoomsSetBehaviour.name,
description:
"Unprotects parted rooms and update the list of protected rooms.",
diff --git a/src/protections/RedactionSynchronisation.ts b/src/protections/RedactionSynchronisation.ts
index 496f6c8b..e36676f8 100644
--- a/src/protections/RedactionSynchronisation.ts
+++ b/src/protections/RedactionSynchronisation.ts
@@ -66,7 +66,7 @@ type RedactionSynchronisationProtectionDescription = ProtectionDescription<
// users will cause issues,, we could just add a second method though.
// FIXME: Just add the invited users thing, we need that code here or there
-// so may aswell do it and test it.
+// so may as well do it and test it.
// FIXME: We should consider updating both SetMembership and SetMembershipPolicies
// to understand parted members...
@@ -80,7 +80,7 @@ export interface RedactionSynchronisationConsequences extends Capability {
rejectInvite(
roomID: StringRoomID,
sender: StringUserID,
- reciever: StringUserID,
+ receiver: StringUserID,
reason: string | undefined
): Promise>;
}
@@ -172,8 +172,8 @@ describeCapabilityRenderer({
async redactMessagesIn(userIDOrGlob, reason, roomIDs) {
return await provider.redactMessagesIn(userIDOrGlob, reason, roomIDs);
},
- async rejectInvite(roomID, sender, reciever, reason) {
- return await provider.rejectInvite(roomID, sender, reciever, reason);
+ async rejectInvite(roomID, sender, receiver, reason) {
+ return await provider.rejectInvite(roomID, sender, receiver, reason);
},
} satisfies RedactionSynchronisationConsequences);
},
diff --git a/src/protections/RoomTakedown/RoomDiscovery.ts b/src/protections/RoomTakedown/RoomDiscovery.ts
index 98e2ed15..e6bdf656 100644
--- a/src/protections/RoomTakedown/RoomDiscovery.ts
+++ b/src/protections/RoomTakedown/RoomDiscovery.ts
@@ -116,7 +116,7 @@ export class SynapseHTTPAntispamRoomDiscovery
const storeResult = await this.hashStore.storeUndiscoveredRooms(entries);
if (isError(storeResult)) {
log.error(
- "Unxpected error while trying to store undiscovered rooms",
+ "Unexpected error while trying to store undiscovered rooms",
storeResult.error
);
return;
diff --git a/src/protections/RoomTakedown/RoomDiscoveryRenderer.tsx b/src/protections/RoomTakedown/RoomDiscoveryRenderer.tsx
index 981a6baf..e92cfd37 100644
--- a/src/protections/RoomTakedown/RoomDiscoveryRenderer.tsx
+++ b/src/protections/RoomTakedown/RoomDiscoveryRenderer.tsx
@@ -16,7 +16,7 @@ export function renderDiscoveredRoom(details: RoomBasicDetails): DocumentNode {
-
- name:
{details.name ?? "Unamed room"}
+ name: {details.name ?? "Unnamed room"}
-
member count:
{details.joined_members ?? "unknown"}
diff --git a/src/protections/RoomTakedown/RoomTakedown.ts b/src/protections/RoomTakedown/RoomTakedown.ts
index 12fc5835..570159c6 100644
--- a/src/protections/RoomTakedown/RoomTakedown.ts
+++ b/src/protections/RoomTakedown/RoomTakedown.ts
@@ -20,7 +20,7 @@ import { RoomTakedownCapability } from "../../capabilities/RoomTakedownCapabilit
const log = new Logger("RoomTakedown");
// FIXME: How can we segment this so that rooms are takendown on prompt in
-// the abscence of policy approval?
+// the absence of policy approval?
// Probably by using a simulated capability that asks to confirm and then
// does the takedown for real?
// Probably by using an updated version of the shutdown command...
diff --git a/src/protections/RoomTakedown/RoomTakedownProtection.ts b/src/protections/RoomTakedown/RoomTakedownProtection.ts
index 2858d139..4c0f148e 100644
--- a/src/protections/RoomTakedown/RoomTakedownProtection.ts
+++ b/src/protections/RoomTakedown/RoomTakedownProtection.ts
@@ -59,7 +59,7 @@ const RoomTakedownProtectionSettings = Type.Object(
discoveryNotificationEnabled: Type.Boolean({
default: false,
description:
- "Wether to send notifications for newly discovered rooms from the homerserver.",
+ "Whether to send notifications for newly discovered rooms from the homeserver.",
}),
},
{ title: "RoomTakedownProtectionSettings" }
diff --git a/src/protections/RoomTakedown/SqliteRoomAuditLog.ts b/src/protections/RoomTakedown/SqliteRoomAuditLog.ts
index 6ebe2601..2f3a5503 100644
--- a/src/protections/RoomTakedown/SqliteRoomAuditLog.ts
+++ b/src/protections/RoomTakedown/SqliteRoomAuditLog.ts
@@ -33,7 +33,7 @@ const log = new Logger("SqliteRoomAuditLog");
// NOTE: This should only be used to check in bulk whether rooms are taken down
// upon getting a policy, you probably always want to try again or
// check with the server rather than check the audit log.
-// Incase rooms were unbanned.
+// In case rooms were unbanned.
const SchemaText = [
`
diff --git a/src/protections/invitation/JoinRoomsOnInviteProtection.tsx b/src/protections/invitation/JoinRoomsOnInviteProtection.tsx
index f7725398..44b71470 100644
--- a/src/protections/invitation/JoinRoomsOnInviteProtection.tsx
+++ b/src/protections/invitation/JoinRoomsOnInviteProtection.tsx
@@ -141,7 +141,7 @@ export class JoinRoomsOnInviteProtection
const renderFailedTojoin = (error: ActionError) => {
const title = (
- Unfortunatley I was unable to accept the invitation from{" "}
+ Unfortunately I was unable to accept the invitation from{" "}
{renderMentionPill(event.sender, event.sender)} to the room{" "}
{renderRoomPill(room)}.
diff --git a/src/queues/LeakyBucket.ts b/src/queues/LeakyBucket.ts
index e5ee78f5..fcdd86d4 100644
--- a/src/queues/LeakyBucket.ts
+++ b/src/queues/LeakyBucket.ts
@@ -18,7 +18,7 @@ type BucketEntry = {
};
/**
- * A lazy version of the bucket to be used when the throuhgput is really
+ * A lazy version of the bucket to be used when the throughput is really
* low most of the time, so doesn't warrant constant filling/leaking.
*
* This won't be good to use in a high throughput situation because
diff --git a/src/queues/ProtectedRoomActivityTracker.ts b/src/queues/ProtectedRoomActivityTracker.ts
index d5dd7cf2..2723bb68 100644
--- a/src/queues/ProtectedRoomActivityTracker.ts
+++ b/src/queues/ProtectedRoomActivityTracker.ts
@@ -39,7 +39,7 @@ export class ProtectedRoomActivityTracker {
}
/**
- * Inform the trakcer that a room is no longer being protected by Draupnir.
+ * Inform the tracker that a room is no longer being protected by Draupnir.
* @param roomId The roomId that is no longer being protected by Draupnir.
*/
public removeProtectedRoom(roomId: string): void {
diff --git a/src/report/ReportManager.ts b/src/report/ReportManager.ts
index e015373f..7f497705 100644
--- a/src/report/ReportManager.ts
+++ b/src/report/ReportManager.ts
@@ -512,7 +512,7 @@ export class StandardReportManager {
}
);
} else {
- throw new TypeError(`Something is throwing absoloute garbage ${ex}`);
+ throw new TypeError(`Something is throwing absolute garbage ${ex}`);
}
}
}
diff --git a/src/safemode/DraupnirSafeMode.ts b/src/safemode/DraupnirSafeMode.ts
index f59faef2..2a189e32 100644
--- a/src/safemode/DraupnirSafeMode.ts
+++ b/src/safemode/DraupnirSafeMode.ts
@@ -25,7 +25,7 @@ import {
} from "./SafeModeCommandDispatcher";
import {
ARGUMENT_PROMPT_LISTENER,
- DEFAUILT_ARGUMENT_PROMPT_LISTENER,
+ DEFAULT_ARGUMENT_PROMPT_LISTENER,
makeListenerForArgumentPrompt,
makeListenerForPromptDefault,
} from "../commands/interface-manager/MatrixPromptForAccept";
@@ -84,7 +84,7 @@ export class SafeModeDraupnir implements MatrixAdaptorContext {
)
);
this.reactionHandler.on(
- DEFAUILT_ARGUMENT_PROMPT_LISTENER,
+ DEFAULT_ARGUMENT_PROMPT_LISTENER,
makeListenerForPromptDefault(
this.commandRoomID,
this.commandDispatcher,
diff --git a/src/safemode/PersistentConfigEditor.ts b/src/safemode/PersistentConfigEditor.ts
index d2502348..c00e8c3e 100644
--- a/src/safemode/PersistentConfigEditor.ts
+++ b/src/safemode/PersistentConfigEditor.ts
@@ -32,7 +32,7 @@ export interface PersistentConfigEditor {
getConfigAdaptors(): PersistentConfigData[];
requestConfigStatus(): Promise>;
/**
- * requestConfigStatus, but be sure to update the PeristentConfigStatus list
+ * requestConfigStatus, but be sure to update the PersistentConfigStatus list
* with the ConfigPropertyUseError in the safe mode cause, if there is one.
*
* This is because `ConfigPropertyUseError`'s will not show up in parsing,
diff --git a/src/safemode/commands/RecoverCommand.tsx b/src/safemode/commands/RecoverCommand.tsx
index 1d1b1eb9..f773dd40 100644
--- a/src/safemode/commands/RecoverCommand.tsx
+++ b/src/safemode/commands/RecoverCommand.tsx
@@ -33,7 +33,7 @@ export type SafeModeRecoverEffectInfo = {
};
export const SafeModeRecoverCommand = describeCommand({
- summary: "Select an availale recovery option to enact.",
+ summary: "Select an available recovery option to enact.",
parameters: tuple({
name: "recovery option",
acceptor: StringPresentationType,
diff --git a/src/utils.ts b/src/utils.ts
index 9d79e3e8..bd1e6faa 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -308,7 +308,7 @@ type RequestResponse =
* - they offer no stack.
*
* This method configures `MatrixClient` to ensure that methods that may throw
- * instead throws more reasonable insetances of `Error`.
+ * instead throws more reasonable instances of `Error`.
*/
function patchMatrixClientForConciseExceptions() {
if (isMatrixClientPatchedForConciseExceptions) {
@@ -465,7 +465,7 @@ function patchMatrixClientForRetry() {
err?.body?.errcode === "M_LIMIT_EXCEEDED"
) {
// We need to retry.
- // We're not able to refactor away from thsis now, pretty unfortunatley.
+ // We're not able to refactor away from this now, pretty unfortunately.
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
reject(err);
} else {
diff --git a/src/webapis/WebAPIs.ts b/src/webapis/WebAPIs.ts
index e467760e..0e5bf114 100644
--- a/src/webapis/WebAPIs.ts
+++ b/src/webapis/WebAPIs.ts
@@ -191,12 +191,12 @@ export class WebAPIs {
const authorization = request.get("Authorization");
if (authorization) {
- const brearerMatch = AUTHORIZATION.exec(authorization);
- if (brearerMatch === null) {
+ const bearerMatch = AUTHORIZATION.exec(authorization);
+ if (bearerMatch === null) {
response.status(401).send("Missing access token");
return;
} else {
- [, accessToken] = brearerMatch;
+ [, accessToken] = bearerMatch;
}
} else if (typeof request.query["access_token"] === "string") {
// Authentication mechanism 2: Access token as query parameter.
@@ -254,7 +254,7 @@ export class WebAPIs {
*/
// Now, let's gather more info on the event.
- // IMPORTANT: The following call will return the event without decyphering it, so we're
+ // IMPORTANT: The following call will return the event without deciphering it, so we're
// not obtaining anything that we couldn't also obtain through a homeserver's Admin API.
//
// By doing this with the reporterClient, we ensure that this feature of Draupnir can work
diff --git a/test/unit/protections/RedactionSynchronisationTest.ts b/test/unit/protections/RedactionSynchronisationTest.ts
index ba013915..6d298581 100644
--- a/test/unit/protections/RedactionSynchronisationTest.ts
+++ b/test/unit/protections/RedactionSynchronisationTest.ts
@@ -60,7 +60,7 @@ describe("RedactionSynchronisation", function () {
mockMethodCalls += 1;
return Ok(undefined);
},
- async rejectInvite(roomID, sender, _reciever, _reason) {
+ async rejectInvite(roomID, sender, _receiver, _reason) {
expect(roomID).toBe(room.toRoomIDOrAlias());
expect(sender).toBe(targetUser);
mockMethodCalls += 1;
diff --git a/test/unit/stores/hashStoreTest.ts b/test/unit/stores/hashStoreTest.ts
index 0eb2a4e6..6d8ad2a5 100644
--- a/test/unit/stores/hashStoreTest.ts
+++ b/test/unit/stores/hashStoreTest.ts
@@ -69,7 +69,7 @@ describe("meow", function () {
expect(reverserResult.length).toBe(0);
// now try storing the room and testing that the policy is there
(await store.storeUndiscoveredRooms([bannedRoom.toRoomIDOrAlias()])).expect(
- "Should be able to discover rooms jsut fine"
+ "Should be able to discover rooms just fine"
);
const foundHash = (await store.findRoomHash(bannedRoomHash)).expect(
"Should be able to findRoomHash"
@@ -116,7 +116,7 @@ describe("meow", function () {
expect(reverserResult.length).toBe(0);
// now try storing the room and testing that the policy is there
(await store.storeUndiscoveredRooms([roomBannedViaServer])).expect(
- "Should be able to discover rooms jsut fine"
+ "Should be able to discover rooms just fine"
);
const foundHash = (await store.findServerHash(bannedServerHash)).expect(
"Should be able to now find the server hash from the room we discovered"
diff --git a/test/unit/stores/roomStateBackingStoreTest.ts b/test/unit/stores/roomStateBackingStoreTest.ts
index ff38c5c8..7730af08 100644
--- a/test/unit/stores/roomStateBackingStoreTest.ts
+++ b/test/unit/stores/roomStateBackingStoreTest.ts
@@ -88,7 +88,7 @@ describe("RoomStateBackingStore", function () {
const db = new Database(options.path);
db.pragma("FOREIGN_KEYS = ON");
// This is not the real former schema, because they are the same
- // it's just differnt on purpose
+ // it's just different on purpose
db.exec(`
CREATE TABLE room_info (
room_id TEXT PRIMARY KEY NOT NULL