diff --git a/.github/workflows/jsonrpc-client-npm-package.yml b/.github/workflows/jsonrpc-client-npm-package.yml index b7f2f34d9..57ec35095 100644 --- a/.github/workflows/jsonrpc-client-npm-package.yml +++ b/.github/workflows/jsonrpc-client-npm-package.yml @@ -22,7 +22,7 @@ jobs: id: tag uses: dawidd6/action-get-tag@v1 continue-on-error: true - - name: Get Pullrequest ID + - name: Get Pull Request ID id: prepare run: | tag=${{ steps.tag.outputs.tag }} diff --git a/.github/workflows/node-delete-preview.yml b/.github/workflows/node-delete-preview.yml index 447448cd1..34ba9477f 100644 --- a/.github/workflows/node-delete-preview.yml +++ b/.github/workflows/node-delete-preview.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - name: Get Pullrequest ID + - name: Get Pull Request ID id: getid run: | export PULLREQUEST_ID=$(jq .number < $GITHUB_EVENT_PATH) diff --git a/.github/workflows/node-package.yml b/.github/workflows/node-package.yml index 4ae546397..7575de84d 100644 --- a/.github/workflows/node-package.yml +++ b/.github/workflows/node-package.yml @@ -78,7 +78,7 @@ jobs: id: tag uses: dawidd6/action-get-tag@v1 continue-on-error: true - - name: Get Pullrequest ID + - name: Get Pull Request ID id: prepare run: | tag=${{ steps.tag.outputs.tag }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 53646b0fa..6bb00ede2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,7 +102,7 @@ ### Fixes - Securejoin: Fix adding and handling Autocrypt-Gossip headers #3914 -- fix verifier-by addr was empty string intead of None #3961 +- fix verifier-by addr was empty string instead of None #3961 - Emit DC_EVENT_MSGS_CHANGED for DC_CHAT_ID_ARCHIVED_LINK when the number of archived chats with unread messages increases #3959 - Fix Peerstate comparison #3962 @@ -203,7 +203,7 @@ - jsonrpc: Add async Python client #3734 ### Fixes -- Make sure malformed messsages will never block receiving further messages anymore #3771 +- Make sure malformed messages will never block receiving further messages anymore #3771 - strip leading/trailing whitespace from "Chat-Group-Name{,-Changed}:" headers content #3650 - Assume all Thunderbird users prefer encryption #3774 - refactor peerstate handling to ensure no duplicate peerstates #3776 @@ -355,7 +355,7 @@ - `importBackup()` - `getMessageHtml()` #3671 - `miscGetStickerFolder` and `miscGetStickers` #3672 -- breaking: jsonrpc: remove function `messageListGetMessageIds()`, it is replaced by `getMessageIds()` and `getMessageListItems()` the latter returns a new `MessageListItem` type, which is the now prefered way of using the message list. +- breaking: jsonrpc: remove function `messageListGetMessageIds()`, it is replaced by `getMessageIds()` and `getMessageListItems()` the latter returns a new `MessageListItem` type, which is the now preferred way of using the message list. - jsonrpc: add type: #3641, #3645 - `MessageSearchResult` - `Location` @@ -381,7 +381,7 @@ - jsonrpc js client: - Change package name from `deltachat-jsonrpc-client` to `@deltachat/jsonrpc-client` - remove relative file dependency to it from `deltachat-node` (because it did not work anyway and broke the nix build of desktop) - - ci: add github ci action to upload it to our download server automaticaly on realease + - ci: add github ci action to upload it to our download server automatically on release ## 1.95.0 @@ -681,7 +681,7 @@ ### Fixes - node: throw error when getting context with an invalid account id -- node: throw error when instanciating a wrapper class on `null` (Context, Message, Chat, ChatList and so on) +- node: throw error when instantiating a wrapper class on `null` (Context, Message, Chat, ChatList and so on) - use same contact-color if email address differ only in upper-/lowercase #3327 - repair encrypted mails "mixed up" by Google Workspace "Append footer" function #3315 @@ -769,7 +769,7 @@ - hopefully fix a bug where outgoing messages appear twice with Amazon SES #3077 - do not delete messages without Message-IDs as duplicates #3095 - assign replies from a different email address to the correct chat #3119 -- assing outgoing private replies to the correct chat #3177 +- assign outgoing private replies to the correct chat #3177 - start ephemeral timer when seen status is synchronized via IMAP #3122 - do not create empty contact requests with "setup changed" messages; instead, send a "setup changed" message into all chats we share with the peer #3187 @@ -822,7 +822,7 @@ - don't watch Sent folder by default #3025 - use webxdc app name in chatlist/quotes/replies etc. #3027 - make it possible to cancel message sending by removing the message #3034, - this was previosuly removed in 1.71.0 #2939 + this was previously removed in 1.71.0 #2939 - synchronize Seen flags only on watched folders to speed up folder scanning #3041 - remove direct dependency on `byteorder` crate #3031 @@ -2044,7 +2044,7 @@ - #1043 avoid potential crashes in malformed From/Chat-Disposition... headers - #1045 #1041 #1038 #1035 #1034 #1029 #1025 various cleanups and doc - improvments + improvements ## 1.0.0-beta.16 @@ -2123,7 +2123,7 @@ - trigger reconnect more often on imap error states. Should fix an issue observed when trying to empty a folder. @hpk42 -- un-split qr tests: we fixed qr-securejoin protocol flakyness +- un-split qr tests: we fixed qr-securejoin protocol flakiness last weeks. @hpk42 ## 1.0.0-beta.10 @@ -2161,7 +2161,7 @@ - fix moving self-sent messages, thanks @r10s, @flub, @hpk42 -- fix flakyness/sometimes-failing verified/join-protocols, +- fix flakiness/sometimes-failing verified/join-protocols, thanks @flub, @r10s, @hpk42 - fix reply-to-encrypted message to keep encryption @@ -2180,7 +2180,7 @@ - fixes imap-protocol parsing bugs that lead to infinitely repeated crashing while trying to receive messages with - a subjec that contained non-utf8. thanks @link2xt + a subject that contained non-utf8. thanks @link2xt - fixed logic to find encryption subkey -- previously delta chat would use the primary key for encryption diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index 6148d4198..298664c8e 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -612,7 +612,7 @@ int dc_all_work_done (dc_context_t* context); * While dc_configure() returns immediately, * the started configuration-job may take a while. * - * During configuration, #DC_EVENT_CONFIGURE_PROGRESS events are emmited; + * During configuration, #DC_EVENT_CONFIGURE_PROGRESS events are emitted; * they indicate a successful configuration as well as errors * and may be used to create a progress bar. * @@ -869,7 +869,7 @@ uint32_t dc_get_chat_id_by_contact_id (dc_context_t* context, uint32_t co * @param context The context object as returned from dc_context_new(). * @param chat_id The chat ID to send the message to. * @param msg The message object to send to the chat defined by the chat ID. - * On succcess, msg_id and state of the object are set up, + * On success, msg_id and state of the object are set up, * The function does not take ownership of the object, * so you have to free it using dc_msg_unref() as usual. * @return The ID of the message that is being prepared. @@ -880,7 +880,7 @@ uint32_t dc_prepare_msg (dc_context_t* context, uint32_t ch /** * Send a message defined by a dc_msg_t object to a chat. * - * Sends the event #DC_EVENT_MSGS_CHANGED on succcess. + * Sends the event #DC_EVENT_MSGS_CHANGED on success. * However, this does not imply, the message really reached the recipient - * sending may be delayed e.g. due to network problems. However, from your * view, you're done with the message. Sooner or later it will find its way. @@ -909,7 +909,7 @@ uint32_t dc_prepare_msg (dc_context_t* context, uint32_t ch * @param chat_id The chat ID to send the message to. * If dc_prepare_msg() was called before, this parameter can be 0. * @param msg The message object to send to the chat defined by the chat ID. - * On succcess, msg_id of the object is set up, + * On success, msg_id of the object is set up, * The function does not take ownership of the object, * so you have to free it using dc_msg_unref() as usual. * @return The ID of the message that is about to be sent. 0 in case of errors. @@ -926,7 +926,7 @@ uint32_t dc_send_msg (dc_context_t* context, uint32_t ch * @param chat_id The chat ID to send the message to. * If dc_prepare_msg() was called before, this parameter can be 0. * @param msg The message object to send to the chat defined by the chat ID. - * On succcess, msg_id of the object is set up, + * On success, msg_id of the object is set up, * The function does not take ownership of the object, * so you have to free it using dc_msg_unref() as usual. * @return The ID of the message that is about to be sent. 0 in case of errors. @@ -937,7 +937,7 @@ uint32_t dc_send_msg_sync (dc_context_t* context, uint32 /** * Send a simple text message a given chat. * - * Sends the event #DC_EVENT_MSGS_CHANGED on succcess. + * Sends the event #DC_EVENT_MSGS_CHANGED on success. * However, this does not imply, the message really reached the recipient - * sending may be delayed e.g. due to network problems. However, from your * view, you're done with the message. Sooner or later it will find its way. @@ -1146,7 +1146,7 @@ void dc_set_draft (dc_context_t* context, uint32_t ch * // not now and not when this code is executed again * dc_add_device_msg(context, "update-123", NULL); * } else { - * // welcome message was not added now, this is an oder installation, + * // welcome message was not added now, this is an older installation, * // add a changelog * dc_add_device_msg(context, "update-123", changelog_msg); * } @@ -3184,7 +3184,7 @@ dc_lot_t* dc_chatlist_get_summary (const dc_chatlist_t* chatlist, siz * it takes the chat ID and the message ID as returned by dc_chatlist_get_chat_id() and dc_chatlist_get_msg_id() * as arguments. The chatlist object itself is not needed directly. * - * This maybe useful if you convert the complete object into a different represenation + * This maybe useful if you convert the complete object into a different representation * as done e.g. in the node-bindings. * If you have access to the chatlist object in some way, using this function is not recommended, * use dc_chatlist_get_summary() in this case instead. @@ -6341,7 +6341,7 @@ void dc_event_unref(dc_event_t* event); /// /// Used in status messages. /// -/// @deperecated 2022-09-10 +/// @deprecated 2022-09-10 #define DC_STR_EPHEMERAL_MINUTE 77 /// "Message deletion timer is set to 1 hour." diff --git a/deltachat-ffi/src/lib.rs b/deltachat-ffi/src/lib.rs index 48f4d9808..8d92da18c 100644 --- a/deltachat-ffi/src/lib.rs +++ b/deltachat-ffi/src/lib.rs @@ -2661,7 +2661,7 @@ pub unsafe fn dc_array_is_independent( /// /// This is the structure behind [dc_chatlist_t] which is the opaque /// structure representing a chatlist in the FFI API. It exists -/// because the FFI API has a refernce from the message to the +/// because the FFI API has a reference from the message to the /// context, but the Rust API does not, so the FFI layer needs to glue /// these together. pub struct ChatlistWrapper { @@ -2805,7 +2805,7 @@ pub unsafe extern "C" fn dc_chatlist_get_context( /// /// This is the structure behind [dc_chat_t] which is the opaque /// structure representing a chat in the FFI API. It exists -/// because the FFI API has a refernce from the message to the +/// because the FFI API has a reference from the message to the /// context, but the Rust API does not, so the FFI layer needs to glue /// these together. pub struct ChatWrapper { @@ -3061,7 +3061,7 @@ pub unsafe extern "C" fn dc_chat_get_info_json( /// /// This is the structure behind [dc_msg_t] which is the opaque /// structure representing a message in the FFI API. It exists -/// because the FFI API has a refernce from the message to the +/// because the FFI API has a reference from the message to the /// context, but the Rust API does not, so the FFI layer needs to glue /// these together. pub struct MessageWrapper { @@ -3814,7 +3814,7 @@ pub unsafe extern "C" fn dc_msg_force_plaintext(msg: *mut dc_msg_t) { /// /// This is the structure behind [dc_contact_t] which is the opaque /// structure representing a contact in the FFI API. It exists -/// because the FFI API has a refernce from the message to the +/// because the FFI API has a reference from the message to the /// context, but the Rust API does not, so the FFI layer needs to glue /// these together. pub struct ContactWrapper { diff --git a/deltachat-jsonrpc/README.md b/deltachat-jsonrpc/README.md index c76329814..3c8dad4dd 100644 --- a/deltachat-jsonrpc/README.md +++ b/deltachat-jsonrpc/README.md @@ -35,7 +35,7 @@ The server can be configured with environment variables: |`DC_PORT`|`20808`|port to listen on| |`DC_ACCOUNTS_PATH`|`./accounts`|path to storage directory| -If you are targetting other architectures (like KaiOS or Android), the webserver binary can be cross-compiled easily with [rust-cross](https://github.com/cross-rs/cross): +If you are targeting other architectures (like KaiOS or Android), the webserver binary can be cross-compiled easily with [rust-cross](https://github.com/cross-rs/cross): ```sh cross build --features=webserver --target armv7-linux-androideabi --release diff --git a/deltachat-jsonrpc/src/api/types/provider_info.rs b/deltachat-jsonrpc/src/api/types/provider_info.rs index 59992e05b..1cc5a7d46 100644 --- a/deltachat-jsonrpc/src/api/types/provider_info.rs +++ b/deltachat-jsonrpc/src/api/types/provider_info.rs @@ -8,7 +8,7 @@ use typescript_type_def::TypeDef; pub struct ProviderInfo { pub before_login_hint: String, pub overview_page: String, - pub status: u32, // in reality this is an enum, but for simlicity and because it gets converted into a number anyway, we use an u32 here. + pub status: u32, // in reality this is an enum, but for simplicity and because it gets converted into a number anyway, we use an u32 here. } impl ProviderInfo { diff --git a/deltachat-jsonrpc/typescript/example/node-add-account.js b/deltachat-jsonrpc/typescript/example/node-add-account.js index 9d3e4a40a..df47c39c9 100644 --- a/deltachat-jsonrpc/typescript/example/node-add-account.js +++ b/deltachat-jsonrpc/typescript/example/node-add-account.js @@ -14,7 +14,7 @@ async function run() { throw new Error( "USAGE: node node-add-account.js " ); - console.log(`creating acccount for ${email}`); + console.log(`creating account for ${email}`); const id = await delta.rpc.addAccount(); console.log(`created account id ${id}`); await delta.rpc.setConfig(id, "addr", email); diff --git a/deltachat-jsonrpc/typescript/report_api_coverage.mjs b/deltachat-jsonrpc/typescript/report_api_coverage.mjs index f80c63c2e..7a1c23859 100644 --- a/deltachat-jsonrpc/typescript/report_api_coverage.mjs +++ b/deltachat-jsonrpc/typescript/report_api_coverage.mjs @@ -1,5 +1,5 @@ import { readFileSync } from "fs"; -// only checks for the coverge of the api functions in bindings.ts for now +// only checks for the coverage of the api functions in bindings.ts for now const generatedFile = "typescript/generated/client.ts"; const json = JSON.parse(readFileSync("./coverage/coverage-final.json")); const jsonCoverage = diff --git a/deltachat-jsonrpc/typescript/test/basic.ts b/deltachat-jsonrpc/typescript/test/basic.ts index f09ed6258..1589a733d 100644 --- a/deltachat-jsonrpc/typescript/test/basic.ts +++ b/deltachat-jsonrpc/typescript/test/basic.ts @@ -53,7 +53,7 @@ describe("basic tests", () => { ]); }); - describe("account managment", () => { + describe("account management", () => { it("should create account", async () => { const res = await dc.rpc.addAccount(); assert((await dc.rpc.getAllAccountIds()).length === 1); @@ -73,7 +73,7 @@ describe("basic tests", () => { }); }); - describe("contact managment", function () { + describe("contact management", function () { let accountId: number; before(async () => { accountId = await dc.rpc.addAccount(); @@ -103,7 +103,7 @@ describe("basic tests", () => { accountId = await dc.rpc.addAccount(); }); - it("set and retrive", async function () { + it("set and retrieve", async function () { await dc.rpc.setConfig(accountId, "addr", "valid@email"); assert((await dc.rpc.getConfig(accountId, "addr")) == "valid@email"); }); @@ -115,11 +115,11 @@ describe("basic tests", () => { await expect(dc.rpc.getConfig(accountId, "invalid_key")).to.be.eventually .rejected; }); - it("set and retrive ui.*", async function () { + it("set and retrieve ui.*", async function () { await dc.rpc.setConfig(accountId, "ui.chat_bg", "color:red"); assert((await dc.rpc.getConfig(accountId, "ui.chat_bg")) == "color:red"); }); - it("set and retrive (batch)", async function () { + it("set and retrieve (batch)", async function () { const config = { addr: "valid@email", mail_pw: "1234" }; await dc.rpc.batchSetConfig(accountId, config); const retrieved = await dc.rpc.batchGetConfig( @@ -128,7 +128,7 @@ describe("basic tests", () => { ); expect(retrieved).to.deep.equal(config); }); - it("set and retrive ui.* (batch)", async function () { + it("set and retrieve ui.* (batch)", async function () { const config = { "ui.chat_bg": "color:green", "ui.enter_key_sends": "true", @@ -140,7 +140,7 @@ describe("basic tests", () => { ); expect(retrieved).to.deep.equal(config); }); - it("set and retrive mixed(ui and core) (batch)", async function () { + it("set and retrieve mixed(ui and core) (batch)", async function () { const config = { "ui.chat_bg": "color:yellow", "ui.enter_key_sends": "false", diff --git a/deltachat-jsonrpc/typescript/test/online.ts b/deltachat-jsonrpc/typescript/test/online.ts index b8fd84d08..418f14679 100644 --- a/deltachat-jsonrpc/typescript/test/online.ts +++ b/deltachat-jsonrpc/typescript/test/online.ts @@ -22,7 +22,7 @@ describe("online tests", function () { process.exit(1); } console.log( - "Missing DCC_NEW_TMP_EMAIL environment variable!, skip intergration tests" + "Missing DCC_NEW_TMP_EMAIL environment variable!, skip integration tests" ); this.skip(); } @@ -36,7 +36,7 @@ describe("online tests", function () { account1 = await createTempUser(process.env.DCC_NEW_TMP_EMAIL); if (!account1 || !account1.email || !account1.password) { console.log( - "We didn't got back an account from the api, skip intergration tests" + "We didn't got back an account from the api, skip integration tests" ); this.skip(); } @@ -44,7 +44,7 @@ describe("online tests", function () { account2 = await createTempUser(process.env.DCC_NEW_TMP_EMAIL); if (!account2 || !account2.email || !account2.password) { console.log( - "We didn't got back an account2 from the api, skip intergration tests" + "We didn't got back an account2 from the api, skip integration tests" ); this.skip(); } @@ -74,7 +74,7 @@ describe("online tests", function () { accountsConfigured = true; }); - it("send and recieve text message", async function () { + it("send and receive text message", async function () { if (!accountsConfigured) { this.skip(); } @@ -106,7 +106,7 @@ describe("online tests", function () { expect(message.text).equal("Hello"); }); - it("send and recieve text message roundtrip, encrypted on answer onwards", async function () { + it("send and receive text message roundtrip, encrypted on answer onwards", async function () { if (!accountsConfigured) { this.skip(); } diff --git a/deltachat-repl/src/cmdline.rs b/deltachat-repl/src/cmdline.rs index 35582c9a3..60f6dc750 100644 --- a/deltachat-repl/src/cmdline.rs +++ b/deltachat-repl/src/cmdline.rs @@ -29,7 +29,7 @@ use tokio::fs; /// Reset database tables. /// Argument is a bitmask, executing single or multiple actions in one call. -/// e.g. bitmask 7 triggers actions definded with bits 1, 2 and 4. +/// e.g. bitmask 7 triggers actions defined with bits 1, 2 and 4. async fn reset_tables(context: &Context, bits: i32) { println!("Resetting tables ({bits})..."); if 0 != bits & 1 { @@ -869,7 +869,7 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu if continue_streaming { println!("Success, streaming should be continued."); } else { - println!("Success, streaming can be stoppped."); + println!("Success, streaming can be stopped."); } } "dellocations" => { diff --git a/deltachat-repl/src/main.rs b/deltachat-repl/src/main.rs index 4cd3412d2..33074d6ab 100644 --- a/deltachat-repl/src/main.rs +++ b/deltachat-repl/src/main.rs @@ -351,7 +351,7 @@ async fn start(args: Vec) -> Result<(), Error> { Ok(line) => { // TODO: ignore "set mail_pw" rl.add_history_entry(line.as_str())?; - let contine = Handle::current().block_on(async { + let should_continue = Handle::current().block_on(async { match handle_cmd(line.trim(), ctx.clone(), &mut selected_chat).await { Ok(ExitResult::Continue) => true, Ok(ExitResult::Exit) => { @@ -365,7 +365,7 @@ async fn start(args: Vec) -> Result<(), Error> { } }); - if !contine { + if !should_continue { break; } } diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py b/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py index dfdcd78c3..ec99f6dca 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/_utils.py @@ -27,7 +27,7 @@ def _to_attrdict(obj): class AttrDict(dict): - """Dictionary that allows accessing values usin the "dot notation" as attributes.""" + """Dictionary that allows accessing values using the "dot notation" as attributes.""" def __init__(self, *args, **kwargs) -> None: super().__init__({_camel_to_snake(key): _to_attrdict(value) for key, value in dict(*args, **kwargs).items()}) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/account.py b/deltachat-rpc-client/src/deltachat_rpc_client/account.py index b1e9fea63..6434ee966 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/account.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/account.py @@ -158,7 +158,7 @@ class Account: :param contact: if a contact is specified only chats including this contact are returned. :param archived_only: if True only archived chats are returned. :param for_forwarding: if True the chat list is sorted with "Saved messages" at the top - and withot "Device chat" and contact requests. + and without "Device chat" and contact requests. :param no_specials: if True archive link is not added to the list. :param alldone_hint: if True the "all done hint" special chat will be added to the list as needed. diff --git a/deltachat_derive/src/lib.rs b/deltachat_derive/src/lib.rs index 4fed46d5d..0ab30254d 100644 --- a/deltachat_derive/src/lib.rs +++ b/deltachat_derive/src/lib.rs @@ -5,7 +5,7 @@ use quote::quote; use crate::proc_macro::TokenStream; -// For now, assume (not check) that these macroses are applied to enum without +// For now, assume (not check) that these macros are applied to enum without // data. If this assumption is violated, compiler error will point to // generated code, which is not very user-friendly. diff --git a/draft/aeap-mvp.md b/draft/aeap-mvp.md index 4cab44a7c..94ac3c03e 100644 --- a/draft/aeap-mvp.md +++ b/draft/aeap-mvp.md @@ -66,13 +66,13 @@ Note that usually a mail is signed by a key that has a UID matching the from add #### Upsides: - With this approach, it's easy to switch to a model where the info about the transition is encoded in the PGP key. Since the key is gossiped, the information about the transition will spread virally. -- Faster transation: If you send a message to e.g. "Delta Chat Dev", all members of the "sub-group" "delta android" will know of your transition. +- Faster transition: If you send a message to e.g. "Delta Chat Dev", all members of the "sub-group" "delta android" will know of your transition. ### Alternatives and old discussions/plans: - Change the contact instead of rewriting the group member lists. This seems to call for more trouble since we will end up with multiple contacts having the same email address. -- If needed, we could add a header a) indicating that the sender did an address transition or b) listing all the secondary (old) addresses. For now, there is no big enough benefit to warrant introducing another header and its processing on the receiver side (including all the neccessary checks and handling of error cases). Instead, we only check for the `Chat-Version` header to prevent accidental transitions when an MUA user sends a message from another email address with the same key. +- If needed, we could add a header a) indicating that the sender did an address transition or b) listing all the secondary (old) addresses. For now, there is no big enough benefit to warrant introducing another header and its processing on the receiver side (including all the necessary checks and handling of error cases). Instead, we only check for the `Chat-Version` header to prevent accidental transitions when an MUA user sends a message from another email address with the same key. - The condition for a transition temporarily was: @@ -107,7 +107,7 @@ The most obvious alternative would be to create a new contact with the new addre #### Upsides: - With this approach, it's easier to switch to a model where the info about the transition is encoded in the PGP key. Since the key is gossiped, the information about the transition will spread virally. -- (Also, less important: Slightly faster transation: If you send a message to e.g. "Delta Chat Dev", all members of the "sub-group" "delta android" will know of your transition.) +- (Also, less important: Slightly faster transition: If you send a message to e.g. "Delta Chat Dev", all members of the "sub-group" "delta android" will know of your transition.) - It's easier to implement (if too many problems turn up, we can still switch to another approach and didn't wast that much development time.) [full messages](https://github.com/deltachat/deltachat-core-rust/pull/2896#discussion_r852002161) @@ -124,4 +124,4 @@ Other Notes during implementing ======================== -- As far as I understand the code, unencrypted messages are unsigned. So, the transition only works if both sides have the other side's key. \ No newline at end of file +- As far as I understand the code, unencrypted messages are unsigned. So, the transition only works if both sides have the other side's key. diff --git a/draft/msgwork_new_imap_jobs.rst b/draft/msgwork_new_imap_jobs.rst index b92f29cf3..8834bdb75 100644 --- a/draft/msgwork_new_imap_jobs.rst +++ b/draft/msgwork_new_imap_jobs.rst @@ -62,5 +62,5 @@ Notes/Questions: and design such that we can cover all imap flags. -- It might not be neccessary to keep needs_send_mdn state in this table +- It might not be necessary to keep needs_send_mdn state in this table if this can be decided rather when we succeed with mark_seen/mark_delete. diff --git a/node/README.md b/node/README.md index a9832bdfd..5628ac4a8 100644 --- a/node/README.md +++ b/node/README.md @@ -124,7 +124,7 @@ $ npm run test ``` (when using [fnm](https://github.com/Schniz/fnm) instead of nvm, you can select the architecture) -If your node and electron are already build for arm64 you can also try bulding for arm: +If your node and electron are already build for arm64 you can also try building for arm: ``` $ fnm install 16 --arch arm64 @@ -182,7 +182,7 @@ this example can also be found in the examples folder [examples/send_message.js] ### Generating Docs -We are curently migrating to automaticaly generated documentation. +We are currently migrating to automatically generated documentation. You can find the old documentation at [old_docs](./old_docs). to generate the documentation, run: diff --git a/node/lib/binding.ts b/node/lib/binding.ts index 72875aa4f..275bf12ff 100644 --- a/node/lib/binding.ts +++ b/node/lib/binding.ts @@ -2,7 +2,7 @@ import { join } from 'path' /** * bindings are not typed yet. - * if the availible function names are required they can be found inside of `../src/module.c` + * if the available function names are required they can be found inside of `../src/module.c` */ export const bindings: any = require('node-gyp-build')(join(__dirname, '../')) diff --git a/node/lib/context.ts b/node/lib/context.ts index c10775f45..4c926ba78 100644 --- a/node/lib/context.ts +++ b/node/lib/context.ts @@ -543,7 +543,7 @@ export class Context extends EventEmitter { /** * - * @deprectated please use `AccountManager.getSystemInfo()` instead + * @deprecated please use `AccountManager.getSystemInfo()` instead */ static getSystemInfo() { return AccountManager.getSystemInfo() @@ -818,7 +818,7 @@ export class Context extends EventEmitter { * Must be given in number of seconds since 00:00 hours, Jan 1, 1970 UTC. * 0 for "all up to now". * @return Array of locations, NULL is never returned. - * The array is sorted decending; + * The array is sorted descending; * the first entry in the array is the location with the newest timestamp. * * Examples: diff --git a/node/lib/deltachat.ts b/node/lib/deltachat.ts index 7a3cf79db..2526b9378 100644 --- a/node/lib/deltachat.ts +++ b/node/lib/deltachat.ts @@ -217,7 +217,7 @@ export class AccountManager extends EventEmitter { /** get information about the provider * * This function creates a temporary context to be standalone, - * if posible use `Context.getProviderFromEmail` instead. (otherwise potential proxy settings are not used) + * if possible use `Context.getProviderFromEmail` instead. (otherwise potential proxy settings are not used) * @deprecated */ static getProviderFromEmail(email: string) { diff --git a/node/test/test.js b/node/test/test.js index d76566b04..3c1baed01 100644 --- a/node/test/test.js +++ b/node/test/test.js @@ -769,7 +769,7 @@ describe('Integration tests', function () { this.beforeAll(async function () { if (!process.env.DCC_NEW_TMP_EMAIL) { console.log( - 'Missing DCC_NEW_TMP_EMAIL environment variable!, skip intergration tests' + 'Missing DCC_NEW_TMP_EMAIL environment variable!, skip integration tests' ) this.skip() } @@ -777,7 +777,7 @@ describe('Integration tests', function () { account = await createTempUser(process.env.DCC_NEW_TMP_EMAIL) if (!account || !account.email || !account.password) { console.log( - "We didn't got back an account from the api, skip intergration tests" + "We didn't got back an account from the api, skip integration tests" ) this.skip() } diff --git a/python/CHANGELOG b/python/CHANGELOG index f1af7a1ef..82aea6e2e 100644 --- a/python/CHANGELOG +++ b/python/CHANGELOG @@ -64,7 +64,7 @@ - use new experimental full-Rust Delta Chat core - support Autocrypt Setup Messages - remove synchronous events -- use CircleCI for continous integration and packaging of Linux wheels +- use CircleCI for continuous integration and packaging of Linux wheels - use docker image for building wheels - fix code documentation links diff --git a/python/src/deltachat/account.py b/python/src/deltachat/account.py index c41286ce8..9d80e35f7 100644 --- a/python/src/deltachat/account.py +++ b/python/src/deltachat/account.py @@ -159,7 +159,7 @@ class Account: """set stock translation string. :param id: id of stock string (const.DC_STR_*) - :param value: string to set as new transalation + :param value: string to set as new translation :returns: None """ bytestring = string.encode("utf8") @@ -628,7 +628,7 @@ class Account: configtracker = self.configure() configtracker.wait_finish() - # start IO threads and configure if neccessary + # start IO threads and configure if necessary self.start_io() def add_account_plugin(self, plugin, name=None): diff --git a/python/src/deltachat/testplugin.py b/python/src/deltachat/testplugin.py index c48b1101f..fd6b06ac2 100644 --- a/python/src/deltachat/testplugin.py +++ b/python/src/deltachat/testplugin.py @@ -60,7 +60,7 @@ def pytest_configure(config): # Make sure we don't get garbled output because threads keep running # collect all ever created accounts in a weakref-set (so we don't - # keep objects unneccessarily alive) and enable/disable logging + # keep objects unnecessarily alive) and enable/disable logging # for each pytest test phase # (setup/call/teardown). # Additionally make the acfactory use a logging/no-logging default. @@ -129,7 +129,7 @@ def pytest_report_header(config, startdir): if cfg: if "?" in cfg: url, token = cfg.split("?", 1) - summary.append(f"Liveconfig provider: {url}?") + summary.append(f"Liveconfig provider: {url}?") else: summary.append(f"Liveconfig file: {cfg}") return summary diff --git a/python/tests/test_1_online.py b/python/tests/test_1_online.py index 280210c6a..7f62dcefd 100644 --- a/python/tests/test_1_online.py +++ b/python/tests/test_1_online.py @@ -1484,7 +1484,7 @@ def test_import_export_online_all(acfactory, tmpdir, data, lp): def test_ac_setup_message(acfactory, lp): # note that the receiving account needs to be configured and running - # before ther setup message is send. DC does not read old messages + # before the setup message is send. DC does not read old messages # as of Jul2019 ac1 = acfactory.new_online_configuring_account() ac2 = acfactory.new_online_configuring_account(cloned_from=ac1) diff --git a/python/tests/test_4_lowlevel.py b/python/tests/test_4_lowlevel.py index cb517670c..84a751ea4 100644 --- a/python/tests/test_4_lowlevel.py +++ b/python/tests/test_4_lowlevel.py @@ -151,7 +151,7 @@ def test_markseen_invalid_message_ids(acfactory): ac1 = acfactory.get_pseudo_configured_account() contact1 = ac1.create_contact("some1@example.com", name="some1") chat = contact1.create_chat() - chat.send_text("one messae") + chat.send_text("one message") ac1._evtracker.get_matching("DC_EVENT_MSGS_CHANGED") msg_ids = [9] lib.dc_markseen_msgs(ac1._dc_context, msg_ids, len(msg_ids)) diff --git a/scripts/codespell.sh b/scripts/codespell.sh new file mode 100755 index 000000000..c828a402a --- /dev/null +++ b/scripts/codespell.sh @@ -0,0 +1,4 @@ +#!/bin/sh +codespell \ + --skip './test-data,./.git,node_modules,.mypy_cache,./src/provider/data.rs,.tox,site-packages,target,Cargo.lock,*.js.map,package-lock.json,./proptest-regressions' \ + --ignore-words-list crate,keypair,keypairs,iif diff --git a/spec.md b/spec.md index 2a9e675be..b12a75464 100644 --- a/spec.md +++ b/spec.md @@ -339,13 +339,13 @@ only on image changes. In older specs, the profile-image was sent as an attachment and `Chat-User-Avatar:` specified its name. -However, it turned out that these attachements are kind of unuexpected to users, +However, it turned out that these attachments are kind of unuexpected to users, therefore the profile-image go to the header now. # Locations -Locations can be attachted to messages using +Locations can be attached to messages using [standard kml-files](https://www.opengeospatial.org/standards/kml/) with well-known names. diff --git a/src/accounts.rs b/src/accounts.rs index 9f013bfe6..e1620526d 100644 --- a/src/accounts.rs +++ b/src/accounts.rs @@ -427,7 +427,7 @@ impl Config { Ok(cfg) } - /// Removes an existing acccount entirely. + /// Removes an existing account entirely. pub async fn remove_account(&mut self, id: u32) -> Result<()> { { if let Some(idx) = self.inner.accounts.iter().position(|e| e.id == id) { @@ -487,7 +487,7 @@ struct AccountConfig { } impl AccountConfig { - /// Get the canoncial dbfile name for this configuration. + /// Get the canonical dbfile name for this configuration. pub fn dbfile(&self, accounts_dir: &Path) -> std::path::PathBuf { accounts_dir.join(&self.dir).join(DB_NAME) } diff --git a/src/aheader.rs b/src/aheader.rs index e471634b8..21b7e7a01 100644 --- a/src/aheader.rs +++ b/src/aheader.rs @@ -235,7 +235,7 @@ mod tests { assert!(Aheader::from_str("foo").is_err()); assert!(Aheader::from_str("\n\n\n").is_err()); assert!(Aheader::from_str(" ;;").is_err()); - assert!(Aheader::from_str("addr=a@t.de; unknwon=1; keydata=jau").is_err()); + assert!(Aheader::from_str("addr=a@t.de; unknown=1; keydata=jau").is_err()); } #[test] diff --git a/src/chat.rs b/src/chat.rs index 803b4fc85..06b029dd8 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -46,7 +46,7 @@ use crate::{location, sql}; pub enum ChatItem { /// Chat message stored in the database. Message { - /// Database ID of the messsage. + /// Database ID of the message. msg_id: MsgId, }, @@ -1206,7 +1206,10 @@ impl Chat { } } Err(err) => { - error!(context, "faild to load contacts for {}: {:#}", chat.id, err); + error!( + context, + "failed to load contacts for {}: {:#}", chat.id, err + ); } } chat.name = chat_name; @@ -2147,7 +2150,7 @@ pub async fn is_contact_in_chat( /// Sends a message object to a chat. /// -/// Sends the event #DC_EVENT_MSGS_CHANGED on succcess. +/// Sends the event #DC_EVENT_MSGS_CHANGED on success. /// However, this does not imply, the message really reached the recipient - /// sending may be delayed eg. due to network problems. However, from your /// view, you're done with the message. Sooner or later it will find its way. @@ -2511,7 +2514,7 @@ pub async fn get_chat_msgs_ex( context .sql .query_map( - // GLOB is used here instead of LIKE becase it is case-sensitive + // GLOB is used here instead of LIKE because it is case-sensitive "SELECT m.id AS id, m.timestamp AS timestamp, m.param AS param, m.from_id AS from_id, m.to_id AS to_id FROM msgs m WHERE m.chat_id=? @@ -3662,7 +3665,7 @@ pub async fn was_device_msg_ever_added(context: &Context, label: &str) -> Result // - deletion in `msgs` with `ContactId::DEVICE` makes sure, // no wrong information are shown in the device chat // - deletion in `devmsglabels` makes sure, -// deleted messages are resetted and useful messages can be added again +// deleted messages are reset and useful messages can be added again // - we reset the config-option `QuotaExceeding` // that is used as a helper to drive the corresponding device message. pub(crate) async fn delete_and_reset_all_device_msgs(context: &Context) -> Result<()> { @@ -4431,7 +4434,7 @@ mod tests { .unwrap(); assert!(msg_id2.is_unset()); - // ... unless everything is deleted and resetted - as needed eg. on device switch + // ... unless everything is deleted and reset - as needed eg. on device switch delete_and_reset_all_device_msgs(&t).await.unwrap(); assert!(!was_device_msg_ever_added(&t, "some-label").await.unwrap()); let msg_id3 = add_device_msg(&t, Some("some-label"), Some(&mut msg)) diff --git a/src/config.rs b/src/config.rs index fc950ba44..2fa64ae96 100644 --- a/src/config.rs +++ b/src/config.rs @@ -246,7 +246,7 @@ pub enum Config { Configured, /// All secondary self addresses separated by spaces - /// (`addr1@example.org addr2@exapmle.org addr3@example.org`) + /// (`addr1@example.org addr2@example.org addr3@example.org`) SecondaryAddrs, /// Read-only core version string. diff --git a/src/configure/server_params.rs b/src/configure/server_params.rs index e8e98a755..019104655 100644 --- a/src/configure/server_params.rs +++ b/src/configure/server_params.rs @@ -4,7 +4,7 @@ use crate::provider::{Protocol, Socket}; /// Set of variable parameters to try during configuration. /// -/// Can be loaded from offline provider database, online configuraiton +/// Can be loaded from offline provider database, online configuration /// or derived from user entered parameters. #[derive(Debug, Clone, PartialEq)] pub(crate) struct ServerParams { diff --git a/src/constants.rs b/src/constants.rs index 9af48cc0b..5ebc47d55 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -103,7 +103,7 @@ pub(crate) const DC_RESEND_USER_AVATAR_DAYS: i64 = 14; // warn about an outdated app after a given number of days. // as we use the "provider-db generation date" as reference (that might not be updated very often) // and as not all system get speedy updates, -// do not use too small value that will annoy users checking for nonexistant updates. +// do not use too small value that will annoy users checking for nonexistent updates. pub(crate) const DC_OUTDATED_WARNING_DAYS: i64 = 365; /// messages that should be deleted get this chat_id; the messages are deleted from the working thread later then. This is also needed as rfc724_mid should be preset as long as the message is not deleted on the server (otherwise it is downloaded again) diff --git a/src/context.rs b/src/context.rs index 0f6d721ea..667f41d8e 100644 --- a/src/context.rs +++ b/src/context.rs @@ -114,7 +114,7 @@ impl ContextBuilder { /// Sets the event channel for this [`Context`]. /// /// Mostly useful when using multiple [`Context`]s, this allows creating one [`Events`] - /// channel and passing it to all [`Context`]s so all events are recieved on the same + /// channel and passing it to all [`Context`]s so all events are received on the same /// channel. /// /// Note that the [account manager](crate::accounts::Accounts) is designed to handle the @@ -196,7 +196,7 @@ pub struct InnerContext { pub(crate) generating_key_mutex: Mutex<()>, /// Mutex to enforce only a single running oauth2 is running. pub(crate) oauth2_mutex: Mutex<()>, - /// Mutex to prevent a race condition when a "your pw is wrong" warning is sent, resulting in multiple messeges being sent. + /// Mutex to prevent a race condition when a "your pw is wrong" warning is sent, resulting in multiple messages being sent. pub(crate) wrong_pw_warning_mutex: Mutex<()>, pub(crate) translated_stockstrings: StockStrings, pub(crate) events: Events, @@ -234,7 +234,7 @@ pub struct InnerContext { /// `last_error` should be used to avoid races with the event thread. pub(crate) last_error: std::sync::RwLock, - /// If debug logging is enabled, this contains all neccesary information + /// If debug logging is enabled, this contains all necessary information pub(crate) debug_logging: RwLock>, } @@ -242,7 +242,7 @@ pub struct InnerContext { pub(crate) struct DebugLogging { /// The message containing the logging xdc pub(crate) msg_id: MsgId, - /// Handle to the background task responisble for sending + /// Handle to the background task responsible for sending pub(crate) loop_handle: task::JoinHandle<()>, /// Channel that log events should be send to /// A background loop will receive and handle them diff --git a/src/download.rs b/src/download.rs index fd0efc9c3..89c99f011 100644 --- a/src/download.rs +++ b/src/download.rs @@ -22,7 +22,7 @@ use crate::{job_try, stock_str, EventType}; /// need to be downloaded completely to handle them correctly, /// eg. to assign them to the correct chat. /// As these messages are typically small, -/// they're catched by `MIN_DOWNLOAD_LIMIT`. +/// they're caught by `MIN_DOWNLOAD_LIMIT`. const MIN_DOWNLOAD_LIMIT: u32 = 32768; /// If a message is downloaded only partially diff --git a/src/ephemeral.rs b/src/ephemeral.rs index e881bd082..507c65e57 100644 --- a/src/ephemeral.rs +++ b/src/ephemeral.rs @@ -1273,7 +1273,7 @@ mod tests { // protection. // // Previously Delta Chat fallen back to using in this case and - // compared received timer value to the timer value of the . Because + // compared received timer value to the timer value of the . Because // their timer values are the same ("disabled"), Delta Chat assumed that the timer was not // changed explicitly and the change should be ignored. // diff --git a/src/events.rs b/src/events.rs index fd7a29c03..78e373657 100644 --- a/src/events.rs +++ b/src/events.rs @@ -70,7 +70,7 @@ impl Events { pub struct EventEmitter(Receiver); impl EventEmitter { - /// Async recv of an event. Return `None` if the `Sender` has been droped. + /// Async recv of an event. Return `None` if the `Sender` has been dropped. pub async fn recv(&self) -> Option { self.0.recv().await.ok() } @@ -89,7 +89,7 @@ impl futures::stream::Stream for EventEmitter { /// The event emitted by a [`Context`] from an [`EventEmitter`]. /// -/// Events are documented on the C/FFI API in `deltachat.h` as `DC_EVENT_*` contants. The +/// Events are documented on the C/FFI API in `deltachat.h` as `DC_EVENT_*` constants. The /// context emits them in relation to various operations happening, a lot of these are again /// documented in `deltachat.h`. /// diff --git a/src/fuzzing.rs b/src/fuzzing.rs index ad920b9ab..c19ae36d1 100644 --- a/src/fuzzing.rs +++ b/src/fuzzing.rs @@ -5,7 +5,7 @@ /// Fuzzing target for simplify(). /// /// Calls simplify() and panics if simplify() panics. -/// Does not return any vaule to avoid exposing internal crate types. +/// Does not return any value to avoid exposing internal crate types. #[cfg(fuzzing)] pub fn simplify(input: String, is_chat_message: bool) { crate::simplify::simplify(input, is_chat_message); diff --git a/src/imap.rs b/src/imap.rs index f6d36182d..2ee391d3e 100644 --- a/src/imap.rs +++ b/src/imap.rs @@ -1394,7 +1394,7 @@ impl Imap { // Check if FETCH response is already in `uid_msgs`. let mut fetch_response = uid_msgs.remove(&request_uid); - // Try to find a requsted UID in returned FETCH responses. + // Try to find a requested UID in returned FETCH responses. while fetch_response.is_none() { let next_fetch_response = if let Some(next_fetch_response) = fetch_responses.next().await { @@ -2204,11 +2204,11 @@ async fn mark_seen_by_uid( .with_context(|| format!("failed to start ephemeral timer for message {msg_id}"))?; Ok(Some(chat_id)) } else { - // Message state has not chnaged. + // Message state has not changed. Ok(None) } } else { - // There is no message is `msgs` table matchng the given UID. + // There is no message is `msgs` table matching the given UID. Ok(None) } } diff --git a/src/imex.rs b/src/imex.rs index 0bc9ab42d..d26a0a613 100644 --- a/src/imex.rs +++ b/src/imex.rs @@ -249,7 +249,7 @@ async fn maybe_add_bcc_self_device_msg(context: &Context) -> Result<()> { // TODO: define this as a stockstring once the wording is settled. msg.text = Some( "It seems you are using multiple devices with Delta Chat. Great!\n\n\ - If you also want to synchronize outgoing messages accross all devices, \ + If you also want to synchronize outgoing messages across all devices, \ go to the settings and enable \"Send copy to self\"." .to_string(), ); @@ -800,7 +800,7 @@ mod tests { println!("{}", &msg); // Check some substrings, indicating things got substituted. // In particular note the mixing of `\r\n` and `\n` depending - // on who generated the stings. + // on who generated the strings. assert!(msg.contains("Autocrypt Setup Message</title")); assert!(msg.contains("<h1>Autocrypt Setup Message</h1>")); assert!(msg.contains("<p>This is the Autocrypt Setup Message used to")); diff --git a/src/message.rs b/src/message.rs index 8e1528a55..fd88cf628 100644 --- a/src/message.rs +++ b/src/message.rs @@ -610,7 +610,7 @@ impl Message { // It's a little unfortunate that the UI has to first call `dc_msg_get_override_sender_name` and then if it was `NULL`, call // `dc_contact_get_display_name` but this was the best solution: // - We could load a Contact struct from the db here to call `dc_get_display_name` instead of returning `None`, but then we had a db - // call everytime (and this fn is called a lot while the user is scrolling through a group), so performance would be bad + // call every time (and this fn is called a lot while the user is scrolling through a group), so performance would be bad // - We could pass both a Contact struct and a Message struct in the FFI, but at least on Android we would need to handle raw // C-data in the Java code (i.e. a `long` storing a C pointer) // - We can't make a param `SenderDisplayname` for messages as sometimes the display name of a contact changes, and we want to show diff --git a/src/mimefactory.rs b/src/mimefactory.rs index 530bfafe6..0de80907c 100644 --- a/src/mimefactory.rs +++ b/src/mimefactory.rs @@ -1932,7 +1932,7 @@ mod tests { // These two combinations are different: If `message_arrives_inbetween` is true, but // `reply` is false, the core is actually expected to use the subject of the message - // that arrived inbetween. + // that arrived in between. assert_eq!( "Re: Some other, completely unrelated subject", msg_to_subject_str_inner(imf_raw, false, false, true).await diff --git a/src/mimeparser.rs b/src/mimeparser.rs index 50b71b092..e05e46ad6 100644 --- a/src/mimeparser.rs +++ b/src/mimeparser.rs @@ -357,7 +357,7 @@ impl MimeMessage { // where this would be useful. warn!( context, - "From header in signed part does't match the outer one", + "From header in signed part doesn't match the outer one", ); } } @@ -525,7 +525,7 @@ impl MimeMessage { } } - /// Squashes mutlipart chat messages with attachment into single-part messages. + /// Squashes mutitpart chat messages with attachment into single-part messages. /// /// Delta Chat sends attachments, such as images, in two-part messages, with the first message /// containing a description. If such a message is detected, text from the first part can be @@ -855,9 +855,9 @@ impl MimeMessage { let mut any_part_added = false; let mimetype = get_mime_type(mail)?.0; match (mimetype.type_(), mimetype.subtype().as_str()) { - /* Most times, mutlipart/alternative contains true alternatives + /* Most times, multipart/alternative contains true alternatives as text/plain and text/html. If we find a multipart/mixed - inside mutlipart/alternative, we use this (happens eg in + inside multipart/alternative, we use this (happens eg in apple mail: "plaintext" as an alternative to "html+PDF attachment") */ (mime::MULTIPART, "alternative") => { for cur_data in &mail.subparts { @@ -1682,7 +1682,7 @@ impl MimeMessage { /// Parses `Autocrypt-Gossip` headers from the email and applies them to peerstates. /// Params: -/// from: The address which sent the message currently beeing parsed +/// from: The address which sent the message currently being parsed /// /// Returns the set of mail recipient addresses for which valid gossip headers were found. async fn update_gossip_peerstates( diff --git a/src/param.rs b/src/param.rs index 1cbd3b468..ae01d3853 100644 --- a/src/param.rs +++ b/src/param.rs @@ -23,7 +23,7 @@ pub enum Param { /// For messages: This name should be shown instead of contact.get_display_name() /// (used if this is a mailinglist - /// or explictly set using set_override_sender_name(), eg. by bots) + /// or explicitly set using set_override_sender_name(), eg. by bots) OverrideSenderDisplayname = b'O', /// For Messages @@ -129,7 +129,7 @@ pub enum Param { ProfileImage = b'i', /// For Chats - /// Signals wheter the chat is the `saved messages` chat + /// Signals whether the chat is the `saved messages` chat Selftalk = b'K', /// For Chats: On sending a new message we set the subject to `Re: <last subject>`. @@ -341,7 +341,7 @@ impl Params { /// returned. /// /// Note that in the [ParamsFile::FsPath] case the blob can be - /// created without copying if the path already referes to a valid + /// created without copying if the path already refers to a valid /// blob. If so a [BlobObject] will be returned regardless of the /// `create` argument. #[allow(clippy::needless_lifetimes)] @@ -389,13 +389,13 @@ impl Params { .map(MsgId::new) } - /// Set the given paramter to the passed in `i32`. + /// Set the given parameter to the passed in `i32`. pub fn set_int(&mut self, key: Param, value: i32) -> &mut Self { self.set(key, format!("{value}")); self } - /// Set the given paramter to the passed in `i64`. + /// Set the given parameter to the passed in `i64`. pub fn set_i64(&mut self, key: Param, value: i64) -> &mut Self { self.set(key, value.to_string()); self diff --git a/src/peerstate.rs b/src/peerstate.rs index 3de53ea35..2913326fe 100644 --- a/src/peerstate.rs +++ b/src/peerstate.rs @@ -595,7 +595,7 @@ impl Peerstate { Err(err) => { warn!( context, - "New address {:?} is not vaild, not doing AEAP: {:#}.", + "New address {:?} is not valid, not doing AEAP: {:#}.", new_addr, err ) diff --git a/src/pgp.rs b/src/pgp.rs index 9d4ae46ea..6cda27632 100644 --- a/src/pgp.rs +++ b/src/pgp.rs @@ -480,7 +480,7 @@ mod tests { static CTEXT_SIGNED: OnceCell<String> = OnceCell::const_new(); static CTEXT_UNSIGNED: OnceCell<String> = OnceCell::const_new(); - /// A cyphertext encrypted to Alice & Bob, signed by Alice. + /// A ciphertext encrypted to Alice & Bob, signed by Alice. async fn ctext_signed() -> &'static String { CTEXT_SIGNED .get_or_init(|| async { @@ -495,7 +495,7 @@ mod tests { .await } - /// A cyphertext encrypted to Alice & Bob, not signed. + /// A ciphertext encrypted to Alice & Bob, not signed. async fn ctext_unsigned() -> &'static String { CTEXT_UNSIGNED .get_or_init(|| async { diff --git a/src/qr_code_generator.rs b/src/qr_code_generator.rs index 90b33d707..63f0bc17f 100644 --- a/src/qr_code_generator.rs +++ b/src/qr_code_generator.rs @@ -99,7 +99,7 @@ fn inner_generate_secure_join_qr_code( Ok(()) })? .build(|w| { - // White Background apears like a card + // White Background appears like a card w.single("rect", |d| { d.attr("x", card_border_size)?; d.attr("y", card_border_size)?; diff --git a/src/quota.rs b/src/quota.rs index 90eab5222..b4a2be225 100644 --- a/src/quota.rs +++ b/src/quota.rs @@ -68,7 +68,7 @@ async fn get_unique_quota_roots_and_usage( .cloned() .context("quota_root should have a quota")?; // replace old quotas, because between fetching quotaroots for folders, - // messages could be recieved and so the usage could have been changed + // messages could be received and so the usage could have been changed *unique_quota_roots .entry(quota_root_name.clone()) .or_insert_with(Vec::new) = quota.resources; diff --git a/src/reaction.rs b/src/reaction.rs index d6f2cb6f1..832304b87 100644 --- a/src/reaction.rs +++ b/src/reaction.rs @@ -30,7 +30,7 @@ use crate::message::{rfc724_mid_exists, Message, MsgId, Viewtype}; /// It is guaranteed to have all emojis sorted and deduplicated inside. #[derive(Debug, Default, Clone)] pub struct Reaction { - /// Canonical represntation of reaction as a string of space-separated emojis. + /// Canonical representation of reaction as a string of space-separated emojis. reaction: String, } @@ -195,7 +195,7 @@ pub async fn send_reaction(context: &Context, msg_id: MsgId, reaction: &str) -> reaction_msg.in_reply_to = Some(msg.rfc724_mid); reaction_msg.hidden = true; - // Send messsage first. + // Send message first. let reaction_msg_id = send_msg(context, chat_id, &mut reaction_msg).await?; // Only set reaction if we successfully sent the message. diff --git a/src/receive_imf.rs b/src/receive_imf.rs index 7ee1b8a00..d30880bf6 100644 --- a/src/receive_imf.rs +++ b/src/receive_imf.rs @@ -150,7 +150,7 @@ pub(crate) async fn receive_imf_inner( if let Some(old_msg_id) = message::rfc724_mid_exists(context, rfc724_mid).await? { let msg = Message::load_from_db(context, old_msg_id).await?; if msg.download_state() != DownloadState::Done && is_partial_download.is_none() { - // the mesage was partially downloaded before and is fully downloaded now. + // the message was partially downloaded before and is fully downloaded now. info!( context, "Message already partly in DB, replacing by full message." @@ -422,7 +422,7 @@ pub async fn from_field_to_contact_id( } /// Creates a `ReceivedMsg` from given parts which might consist of -/// mulitple messages (if there are multiple attachments). +/// multiple messages (if there are multiple attachments). /// Every entry in `mime_parser.parts` produces a new row in the `msgs` table. #[allow(clippy::too_many_arguments, clippy::cognitive_complexity)] async fn add_parts( @@ -550,7 +550,7 @@ async fn add_parts( } } - // signals wether the current user is a bot + // signals whether the current user is a bot let is_bot = context.get_config_bool(Config::Bot).await?; if chat_id.is_none() { @@ -1981,7 +1981,7 @@ async fn apply_mailinglist_changes( if let Some(old_list_post) = chat.param.get(Param::ListPost) { if list_post.as_ref() != old_list_post { // Apparently the mailing list is using a different List-Post header in each message. - // Make the mailing list read-only because we would't know which message the user wants to reply to. + // Make the mailing list read-only because we wouldn't know which message the user wants to reply to. chat.param.remove(Param::ListPost); chat.update_param(context).await?; } @@ -2296,7 +2296,7 @@ pub(crate) async fn get_prefetch_parent_message( /// /// * param `prevent_rename`: if true, the display_name of this contact will not be changed. Useful for /// mailing lists: In some mailing lists, many users write from the same address but with different -/// display names. We don't want the display name to change everytime the user gets a new email from +/// display names. We don't want the display name to change every time the user gets a new email from /// a mailing list. async fn add_or_lookup_contacts_by_address_list( context: &Context, diff --git a/src/receive_imf/tests.rs b/src/receive_imf/tests.rs index 2fec63df4..9cdcc2c20 100644 --- a/src/receive_imf/tests.rs +++ b/src/receive_imf/tests.rs @@ -2485,7 +2485,7 @@ Reply to all"#, /// Tests that replies to similar ad hoc groups are correctly assigned to chats. /// -/// The difficutly here is that ad hoc groups don't have unique group IDs, because both +/// The difficulty here is that ad hoc groups don't have unique group IDs, because both /// messages have the same recipient lists and only differ in the subject and message contents. /// The messages can be properly assigned to chats only using the In-Reply-To or References /// headers. diff --git a/src/securejoin/bobstate.rs b/src/securejoin/bobstate.rs index bbc3c14f3..9640e5d1c 100644 --- a/src/securejoin/bobstate.rs +++ b/src/securejoin/bobstate.rs @@ -539,7 +539,7 @@ impl SecureJoinStep { false } SecureJoinStep::Completed => { - warn!(context, "Complted state for next securejoin step"); + warn!(context, "Completed state for next securejoin step"); false } } diff --git a/src/smtp.rs b/src/smtp.rs index ca0e69ff8..1786006e9 100644 --- a/src/smtp.rs +++ b/src/smtp.rs @@ -436,7 +436,7 @@ pub(crate) async fn smtp_send( // Any extended smtp status codes like x.1.1, x.1.2 or x.1.3 that we // receive as a transient error are misconfigurations of the smtp server. // See <https://tools.ietf.org/html/rfc3463#section-3.2> - info!(context, "Received extended status code {} for a transient error. This looks like a misconfigured smtp server, let's fail immediatly", first_word); + info!(context, "Received extended status code {} for a transient error. This looks like a misconfigured SMTP server, let's fail immediately", first_word); SendResult::Failure(format_err!("Permanent SMTP error: {}", err)) } else { info!( @@ -656,7 +656,7 @@ pub(crate) async fn send_smtp_messages(context: &Context, connection: &mut Smtp) } // although by slow sending, ratelimit may have been expired meanwhile, - // do not attempt to send MDNs if ratelimited happend before on status-updates/sync: + // do not attempt to send MDNs if ratelimited happened before on status-updates/sync: // instead, let the caller recall this function so that more important status-updates/sync are sent out. if !ratelimited { send_mdns(context, connection) diff --git a/src/smtp/send.rs b/src/smtp/send.rs index 938deb5fc..b1b25b7a7 100644 --- a/src/smtp/send.rs +++ b/src/smtp/send.rs @@ -9,7 +9,7 @@ use crate::events::EventType; pub type Result<T> = std::result::Result<T, Error>; -// if more recipients are needed in SMTP's `RCPT TO:` header, recipient-list is splitted to chunks. +// if more recipients are needed in SMTP's `RCPT TO:` header, recipient-list is split to chunks. // this does not affect MIME'e `To:` header. // can be overwritten by the setting `max_smtp_rcpt_to` in provider-db. pub(crate) const DEFAULT_MAX_SMTP_RCPT_TO: usize = 50; diff --git a/src/sql.rs b/src/sql.rs index e37cb0856..aec50171a 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -687,7 +687,7 @@ pub async fn housekeeping(context: &Context) -> Result<()> { if let Err(err) = remove_unused_files(context).await { warn!( context, - "Housekeeping: cannot remove unusued files: {:#}", err + "Housekeeping: cannot remove unused files: {:#}", err ); } diff --git a/src/stock_str.rs b/src/stock_str.rs index 426f94600..ff8afcf42 100644 --- a/src/stock_str.rs +++ b/src/stock_str.rs @@ -801,7 +801,7 @@ pub(crate) async fn sync_msg_subject(context: &Context) -> String { translated(context, StockMessage::SyncMsgSubject).await } -/// Stock string: `This message is used to synchronize data betweeen your devices.`. +/// Stock string: `This message is used to synchronize data between your devices.`. pub(crate) async fn sync_msg_body(context: &Context) -> String { translated(context, StockMessage::SyncMsgBody).await } diff --git a/src/summary.rs b/src/summary.rs index dc724a7a4..8a22b4b54 100644 --- a/src/summary.rs +++ b/src/summary.rs @@ -53,7 +53,7 @@ pub struct Summary { } impl Summary { - /// Constucts chatlist summary + /// Constructs chatlist summary /// from the provided message, chat and message author contact snapshots. pub async fn new( context: &Context, diff --git a/src/sync.rs b/src/sync.rs index 8eba78308..a977d1c57 100644 --- a/src/sync.rs +++ b/src/sync.rs @@ -434,9 +434,9 @@ mod tests { .parse_sync_items( r#"{"items":[ {"timestamp":1631781316,"data":{"AddQrToken":{"invitenumber":"yip-in","auth":"a"}}}, -{"timestamp":1631781316,"data":{"DeleteQrToken":{"invitenumber":"in","auth":"delete unexistant, shall continue"}}}, +{"timestamp":1631781316,"data":{"DeleteQrToken":{"invitenumber":"in","auth":"delete unexistent, shall continue"}}}, {"timestamp":1631781316,"data":{"AddQrToken":{"invitenumber":"in","auth":"yip-auth"}}}, -{"timestamp":1631781316,"data":{"AddQrToken":{"invitenumber":"in","auth":"foo","grpid":"non-existant"}}}, +{"timestamp":1631781316,"data":{"AddQrToken":{"invitenumber":"in","auth":"foo","grpid":"non-existent"}}}, {"timestamp":1631781316,"data":{"AddQrToken":{"invitenumber":"in","auth":"directly deleted"}}}, {"timestamp":1631781316,"data":{"DeleteQrToken":{"invitenumber":"in","auth":"directly deleted"}}} ]}"# @@ -447,7 +447,7 @@ mod tests { assert!(token::exists(&t, Namespace::InviteNumber, "yip-in").await); assert!(token::exists(&t, Namespace::Auth, "yip-auth").await); - assert!(!token::exists(&t, Namespace::Auth, "non-existant").await); + assert!(!token::exists(&t, Namespace::Auth, "non-existent").await); assert!(!token::exists(&t, Namespace::Auth, "directly deleted").await); Ok(()) diff --git a/src/timesmearing.rs b/src/timesmearing.rs index d6b0d5be0..21c3c57f8 100644 --- a/src/timesmearing.rs +++ b/src/timesmearing.rs @@ -1,7 +1,7 @@ //! # Time smearing. //! //! As e-mails typically only use a second-based-resolution for timestamps, -//! the order of two mails sent withing one second is unclear. +//! the order of two mails sent within one second is unclear. //! This is bad e.g. when forwarding some messages from a chat - //! these messages will appear at the recipient easily out of order. //! diff --git a/src/tools.rs b/src/tools.rs index c64e8d00a..17de3e0ef 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -387,7 +387,7 @@ pub(crate) async fn create_folder( } } -/// Write a the given content to provied file path. +/// Write a the given content to provided file path. pub(crate) async fn write_file( context: &Context, path: impl AsRef<Path>, diff --git a/src/webxdc.rs b/src/webxdc.rs index 154fb61a8..1c9a8095b 100644 --- a/src/webxdc.rs +++ b/src/webxdc.rs @@ -658,7 +658,7 @@ async fn get_blob(archive: &mut async_zip::read::fs::ZipFileReader, name: &str) impl Message { /// Get handle to a webxdc ZIP-archive. - /// To check for file existance use archive.by_name(), to read a file, use get_blob(archive). + /// To check for file existence use archive.by_name(), to read a file, use get_blob(archive). async fn get_webxdc_archive( &self, context: &Context,