chore: Fix a bunch of typos

This commit is contained in:
Damir Jelić 2022-09-28 16:32:39 +02:00
parent 4254a5d9d5
commit 64a3fb0a48
11 changed files with 42 additions and 42 deletions

View File

@ -29,7 +29,7 @@ Pantalaimon can also be found on pypi:
pip install pantalaimon pip install pantalaimon
Pantalaimon contains a dbus based UI that can be used to controll the daemon. Pantalaimon contains a dbus based UI that can be used to control the daemon.
The dbus based UI is completely optional and needs to be installed with the The dbus based UI is completely optional and needs to be installed with the
daemon: daemon:

View File

@ -51,7 +51,7 @@ The message will be sent away after all devices are marked as ignored.
In contrast to the In contrast to the
.Cm send-anyways .Cm send-anyways
command this command cancels the sending of a message to an encrypted room with command this command cancels the sending of a message to an encrypted room with
unverified devices and gives the user the oportunity to verify or blacklist unverified devices and gives the user the opportunity to verify or blacklist
devices as they see fit. devices as they see fit.
.It Cm import-keys Ar pan-user Ar file Ar passphrase .It Cm import-keys Ar pan-user Ar file Ar passphrase
Import end-to-end encryption keys from the given file for the given pan-user. Import end-to-end encryption keys from the given file for the given pan-user.

View File

@ -74,7 +74,7 @@ are as follows:
> In contrast to the > In contrast to the
> **send-anyways** > **send-anyways**
> command this command cancels the sending of a message to an encrypted room with > command this command cancels the sending of a message to an encrypted room with
> unverified devices and gives the user the oportunity to verify or blacklist > unverified devices and gives the user the opportunity to verify or blacklist
> devices as they see fit. > devices as they see fit.
**import-keys** *pan-user* *file* *passphrase* **import-keys** *pan-user* *file* *passphrase*

View File

@ -86,7 +86,7 @@ The amount of time to wait between room message history requests to the
Homeserver in ms. Defaults to 3000. Homeserver in ms. Defaults to 3000.
.El .El
.Pp .Pp
Aditional to the homeserver section a special section with the name Additional to the homeserver section a special section with the name
.Cm Default .Cm Default
can be used to configure the following values for all homeservers: can be used to configure the following values for all homeservers:
.Cm ListenAddress , .Cm ListenAddress ,

View File

@ -69,7 +69,7 @@ The following keys are optional in the proxy instance sections:
> incoming messages will be decryptable, the proxy will be unable to decrypt the > incoming messages will be decryptable, the proxy will be unable to decrypt the
> room history. Defaults to "No". > room history. Defaults to "No".
Aditional to the homeserver section a special section with the name Additional to the homeserver section a special section with the name
**Default** **Default**
can be used to configure the following values for all homeservers: can be used to configure the following values for all homeservers:
**ListenAddress**, **ListenAddress**,

View File

@ -735,7 +735,7 @@ class PanClient(AsyncClient):
pass pass
response = ( response = (
f"Succesfully continued the key requests from " f"Successfully continued the key requests from "
f"{message.user_id} via {message.device_id}" f"{message.user_id} via {message.device_id}"
) )
ret = "m.ok" ret = "m.ok"
@ -760,7 +760,7 @@ class PanClient(AsyncClient):
if cancelled: if cancelled:
response = ( response = (
f"Succesfully cancelled key requests from " f"Successfully cancelled key requests from "
f"{message.user_id} via {message.device_id}" f"{message.user_id} via {message.device_id}"
) )
ret = "m.ok" ret = "m.ok"

View File

@ -31,7 +31,7 @@ class PanConfigParser(configparser.ConfigParser):
"IgnoreVerification": "False", "IgnoreVerification": "False",
"ListenAddress": "localhost", "ListenAddress": "localhost",
"ListenPort": "8009", "ListenPort": "8009",
"LogLevel": "warnig", "LogLevel": "warning",
"Notifications": "on", "Notifications": "on",
"UseKeyring": "yes", "UseKeyring": "yes",
"SearchRequests": "off", "SearchRequests": "off",
@ -113,7 +113,7 @@ class ServerConfig:
E2E encrypted messages. E2E encrypted messages.
keyring (bool): Enable or disable the OS keyring for the storage of keyring (bool): Enable or disable the OS keyring for the storage of
access tokens. access tokens.
search_requests (bool): Enable or disable aditional Homeserver requests search_requests (bool): Enable or disable additional Homeserver requests
for the search API endpoint. for the search API endpoint.
index_encrypted_only (bool): Enable or disable message indexing fro index_encrypted_only (bool): Enable or disable message indexing fro
non-encrypted rooms. non-encrypted rooms.

View File

@ -227,7 +227,7 @@ class ProxyDaemon:
if ret: if ret:
msg = ( msg = (
f"Device {device.id} of user " f"{device.user_id} succesfully verified." f"Device {device.id} of user " f"{device.user_id} successfully verified."
) )
await client.send_update_device(device) await client.send_update_device(device)
else: else:
@ -242,7 +242,7 @@ class ProxyDaemon:
if ret: if ret:
msg = ( msg = (
f"Device {device.id} of user " f"Device {device.id} of user "
f"{device.user_id} succesfully unverified." f"{device.user_id} successfully unverified."
) )
await client.send_update_device(device) await client.send_update_device(device)
else: else:
@ -257,7 +257,7 @@ class ProxyDaemon:
if ret: if ret:
msg = ( msg = (
f"Device {device.id} of user " f"Device {device.id} of user "
f"{device.user_id} succesfully blacklisted." f"{device.user_id} successfully blacklisted."
) )
await client.send_update_device(device) await client.send_update_device(device)
else: else:
@ -274,7 +274,7 @@ class ProxyDaemon:
if ret: if ret:
msg = ( msg = (
f"Device {device.id} of user " f"Device {device.id} of user "
f"{device.user_id} succesfully unblacklisted." f"{device.user_id} successfully unblacklisted."
) )
await client.send_update_device(device) await client.send_update_device(device)
else: else:
@ -358,7 +358,7 @@ class ProxyDaemon:
else: else:
info_msg = ( info_msg = (
f"Succesfully exported keys for {client.user_id} " f"to {path}" f"Successfully exported keys for {client.user_id} " f"to {path}"
) )
logger.info(info_msg) logger.info(info_msg)
await self.send_response( await self.send_response(
@ -381,7 +381,7 @@ class ProxyDaemon:
) )
else: else:
info_msg = ( info_msg = (
f"Succesfully imported keys for {client.user_id} " f"from {path}" f"Successfully imported keys for {client.user_id} " f"from {path}"
) )
logger.info(info_msg) logger.info(info_msg)
await self.send_response( await self.send_response(
@ -482,7 +482,7 @@ class ProxyDaemon:
use_raw_path (str, optional): Should the raw path be used from the use_raw_path (str, optional): Should the raw path be used from the
request or should we use the path and re-encode it. Some may need request or should we use the path and re-encode it. Some may need
their filters to be sanitized, this requires the parsed version of their filters to be sanitized, this requires the parsed version of
the path, otherise we leave the path as is. the path, otherwise we leave the path as is.
""" """
if not session: if not session:
if not self.default_session: if not self.default_session:
@ -616,7 +616,7 @@ class ProxyDaemon:
await pan_client.close() await pan_client.close()
return return
logger.info(f"Succesfully started new background sync client for " f"{user_id}") logger.info(f"Successfully started new background sync client for " f"{user_id}")
await self.send_ui_message( await self.send_ui_message(
UpdateUsersMessage(self.name, user_id, pan_client.device_id) UpdateUsersMessage(self.name, user_id, pan_client.device_id)
@ -682,7 +682,7 @@ class ProxyDaemon:
if user_id and access_token: if user_id and access_token:
logger.info( logger.info(
f"User: {user} succesfully logged in, starting " f"User: {user} successfully logged in, starting "
f"a background sync client." f"a background sync client."
) )
await self.start_pan_client( await self.start_pan_client(
@ -1033,7 +1033,7 @@ class ProxyDaemon:
except SendRetryError as e: except SendRetryError as e:
return web.Response(status=503, text=str(e)) return web.Response(status=503, text=str(e))
# Aquire a semaphore here so we only send out one # Acquire a semaphore here so we only send out one
# UnverifiedDevicesSignal # UnverifiedDevicesSignal
sem = client.send_semaphores[room_id] sem = client.send_semaphores[room_id]

View File

@ -464,7 +464,7 @@ class PanCtl:
def sas_done(self, pan_user, user_id, device_id, _): def sas_done(self, pan_user, user_id, device_id, _):
print( print(
f"Device {device_id} of user {user_id}" f"Device {device_id} of user {user_id}"
f" succesfully verified for pan user {pan_user}." f" successfully verified for pan user {pan_user}."
) )
def show_sas_invite(self, pan_user, user_id, device_id, _): def show_sas_invite(self, pan_user, user_id, device_id, _):

View File

@ -470,14 +470,14 @@ if UI_ENABLED:
self.bus.publish("org.pantalaimon1", self.control_if, self.device_if) self.bus.publish("org.pantalaimon1", self.control_if, self.device_if)
def unverified_notification(self, message): def unverified_notification(self, message):
notificaton = notify2.Notification( notification = notify2.Notification(
"Unverified devices.", "Unverified devices.",
message=( message=(
f"There are unverified devices in the room " f"There are unverified devices in the room "
f"{message.room_display_name}." f"{message.room_display_name}."
), ),
) )
notificaton.set_category("im") notification.set_category("im")
def send_cb(notification, action_key, user_data): def send_cb(notification, action_key, user_data):
message = user_data message = user_data
@ -488,20 +488,20 @@ if UI_ENABLED:
self.control_if.CancelSending(message.pan_user, message.room_id) self.control_if.CancelSending(message.pan_user, message.room_id)
if "actions" in notify2.get_server_caps(): if "actions" in notify2.get_server_caps():
notificaton.add_action("send", "Send anyways", send_cb, message) notification.add_action("send", "Send anyways", send_cb, message)
notificaton.add_action("cancel", "Cancel sending", cancel_cb, message) notification.add_action("cancel", "Cancel sending", cancel_cb, message)
notificaton.show() notification.show()
def sas_invite_notification(self, message): def sas_invite_notification(self, message):
notificaton = notify2.Notification( notification = notify2.Notification(
"Key verification invite", "Key verification invite",
message=( message=(
f"{message.user_id} via {message.device_id} has started " f"{message.user_id} via {message.device_id} has started "
f"a key verification process." f"a key verification process."
), ),
) )
notificaton.set_category("im") notification.set_category("im")
def accept_cb(notification, action_key, user_data): def accept_cb(notification, action_key, user_data):
message = user_data message = user_data
@ -516,17 +516,17 @@ if UI_ENABLED:
) )
if "actions" in notify2.get_server_caps(): if "actions" in notify2.get_server_caps():
notificaton.add_action("accept", "Accept", accept_cb, message) notification.add_action("accept", "Accept", accept_cb, message)
notificaton.add_action("cancel", "Cancel", cancel_cb, message) notification.add_action("cancel", "Cancel", cancel_cb, message)
notificaton.show() notification.show()
def sas_show_notification(self, message): def sas_show_notification(self, message):
emojis = [x[0] for x in message.emoji] emojis = [x[0] for x in message.emoji]
emoji_str = " ".join(emojis) emoji_str = " ".join(emojis)
notificaton = notify2.Notification( notification = notify2.Notification(
"Short authentication string", "Short authentication string",
message=( message=(
f"Short authentication string for the key verification of" f"Short authentication string for the key verification of"
@ -534,7 +534,7 @@ if UI_ENABLED:
f"{emoji_str}" f"{emoji_str}"
), ),
) )
notificaton.set_category("im") notification.set_category("im")
def confirm_cb(notification, action_key, user_data): def confirm_cb(notification, action_key, user_data):
message = user_data message = user_data
@ -549,21 +549,21 @@ if UI_ENABLED:
) )
if "actions" in notify2.get_server_caps(): if "actions" in notify2.get_server_caps():
notificaton.add_action("confirm", "Confirm", confirm_cb, message) notification.add_action("confirm", "Confirm", confirm_cb, message)
notificaton.add_action("cancel", "Cancel", cancel_cb, message) notification.add_action("cancel", "Cancel", cancel_cb, message)
notificaton.show() notification.show()
def sas_done_notification(self, message): def sas_done_notification(self, message):
notificaton = notify2.Notification( notification = notify2.Notification(
"Device successfully verified.", "Device successfully verified.",
message=( message=(
f"Device {message.device_id} of user {message.user_id} " f"Device {message.device_id} of user {message.user_id} "
f"successfully verified." f"successfully verified."
), ),
) )
notificaton.set_category("im") notification.set_category("im")
notificaton.show() notification.show()
def message_callback(self): def message_callback(self):
try: try:

View File

@ -28,7 +28,7 @@ ALICE_ID = "@alice:example.org"
async def client(tmpdir, loop): async def client(tmpdir, loop):
store = PanStore(tmpdir) store = PanStore(tmpdir)
queue = janus.Queue() queue = janus.Queue()
conf = ServerConfig("example", "https://exapmle.org") conf = ServerConfig("example", "https://example.org")
conf.history_fetch_delay = 0.1 conf.history_fetch_delay = 0.1
store.save_server_user("example", "@example:example.org") store.save_server_user("example", "@example:example.org")
@ -421,7 +421,7 @@ class TestClass(object):
tasks = client.pan_store.load_fetcher_tasks(client.server_name, client.user_id) tasks = client.pan_store.load_fetcher_tasks(client.server_name, client.user_id)
assert len(tasks) == 1 assert len(tasks) == 1
# Check that the task is our prev_batch from the sync resposne # Check that the task is our prev_batch from the sync response
assert tasks[0].room_id == TEST_ROOM_ID assert tasks[0].room_id == TEST_ROOM_ID
assert tasks[0].token == "t392-516_47314_0_7_1_1_1_11444_1" assert tasks[0].token == "t392-516_47314_0_7_1_1_1_11444_1"
@ -431,7 +431,7 @@ class TestClass(object):
tasks = client.pan_store.load_fetcher_tasks(client.server_name, client.user_id) tasks = client.pan_store.load_fetcher_tasks(client.server_name, client.user_id)
assert len(tasks) == 1 assert len(tasks) == 1
# Check that the task is our end token from the messages resposne # Check that the task is our end token from the messages response
assert tasks[0].room_id == TEST_ROOM_ID assert tasks[0].room_id == TEST_ROOM_ID
assert tasks[0].token == "t47409-4357353_219380_26003_2265" assert tasks[0].token == "t47409-4357353_219380_26003_2265"
@ -519,7 +519,7 @@ class TestClass(object):
) )
assert len(tasks) == 1 assert len(tasks) == 1
# Check that the task is our end token from the messages resposne # Check that the task is our end token from the messages response
assert tasks[0].room_id == TEST_ROOM_ID assert tasks[0].room_id == TEST_ROOM_ID
assert tasks[0].token == "t47409-4357353_219380_26003_2265" assert tasks[0].token == "t47409-4357353_219380_26003_2265"