mirror of
https://github.com/chatmail/core.git
synced 2026-05-13 11:56:30 +03:00
chore: fix typos
Applied fixes suggested by scripts/codespell.sh
This commit is contained in:
@@ -407,7 +407,7 @@ This reverts commit 6f22ce2722b51773d7fbb0d89e4764f963cafd91..
|
|||||||
- Reset quota on configured address change ([#5908](https://github.com/deltachat/deltachat-core-rust/pull/5908)).
|
- Reset quota on configured address change ([#5908](https://github.com/deltachat/deltachat-core-rust/pull/5908)).
|
||||||
- Do not emit progress 1000 when configuration is cancelled.
|
- Do not emit progress 1000 when configuration is cancelled.
|
||||||
- Assume file extensions are 32 chars max and don't contain whitespace ([#5338](https://github.com/deltachat/deltachat-core-rust/pull/5338)).
|
- Assume file extensions are 32 chars max and don't contain whitespace ([#5338](https://github.com/deltachat/deltachat-core-rust/pull/5338)).
|
||||||
- Readd tokens.foreign_id column ([#6038](https://github.com/deltachat/deltachat-core-rust/pull/6038)).
|
- Re-add tokens.foreign_id column ([#6038](https://github.com/deltachat/deltachat-core-rust/pull/6038)).
|
||||||
|
|
||||||
### Miscellaneous Tasks
|
### Miscellaneous Tasks
|
||||||
|
|
||||||
@@ -998,7 +998,7 @@ This reverts commit 6f22ce2722b51773d7fbb0d89e4764f963cafd91..
|
|||||||
|
|
||||||
### Tests
|
### Tests
|
||||||
|
|
||||||
- deltachat-rpc-client: reenable `log_cli`.
|
- deltachat-rpc-client: re-enable `log_cli`.
|
||||||
|
|
||||||
## [1.140.0] - 2024-06-04
|
## [1.140.0] - 2024-06-04
|
||||||
|
|
||||||
@@ -1935,7 +1935,7 @@ This reverts commit 6f22ce2722b51773d7fbb0d89e4764f963cafd91..
|
|||||||
- Mark 1:1 chat as verified for Bob early. 1:1 chat with Alice is verified as soon as Alice's key is verified rather than at the end of the protocol.
|
- Mark 1:1 chat as verified for Bob early. 1:1 chat with Alice is verified as soon as Alice's key is verified rather than at the end of the protocol.
|
||||||
- Put Message-ID into hidden headers and take it from there on receiver ([#4798](https://github.com/deltachat/deltachat-core-rust/pull/4798)). This works around servers which generate their own Message-ID and overwrite the one generated by Delta Chat.
|
- Put Message-ID into hidden headers and take it from there on receiver ([#4798](https://github.com/deltachat/deltachat-core-rust/pull/4798)). This works around servers which generate their own Message-ID and overwrite the one generated by Delta Chat.
|
||||||
- deltachat-repl: Enable INFO logging by default and add timestamps.
|
- deltachat-repl: Enable INFO logging by default and add timestamps.
|
||||||
- Add `ConfigSynced` (`DC_EVENT_CONFIG_SYNCED`) event which is emitted when configuration is changed via synchronization message or synchronization message for configuration is sent. UI may refresh elments based on the configuration key which is a part of the event.
|
- Add `ConfigSynced` (`DC_EVENT_CONFIG_SYNCED`) event which is emitted when configuration is changed via synchronization message or synchronization message for configuration is sent. UI may refresh elements based on the configuration key which is a part of the event.
|
||||||
- Sync contact creation/rename across devices ([#5163](https://github.com/deltachat/deltachat-core-rust/pull/5163)).
|
- Sync contact creation/rename across devices ([#5163](https://github.com/deltachat/deltachat-core-rust/pull/5163)).
|
||||||
- Encrypt MDNs ([#5175](https://github.com/deltachat/deltachat-core-rust/pull/5175)).
|
- Encrypt MDNs ([#5175](https://github.com/deltachat/deltachat-core-rust/pull/5175)).
|
||||||
- Only try to configure non-strict TLS checks if explicitly set ([#5181](https://github.com/deltachat/deltachat-core-rust/pull/5181)).
|
- Only try to configure non-strict TLS checks if explicitly set ([#5181](https://github.com/deltachat/deltachat-core-rust/pull/5181)).
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ If you want to contribute a code, follow this guide.
|
|||||||
CI runs the tests and checks code formatting.
|
CI runs the tests and checks code formatting.
|
||||||
|
|
||||||
While it is running, self-review your PR to make sure all the changes you expect are there
|
While it is running, self-review your PR to make sure all the changes you expect are there
|
||||||
and there are no accidentally commited unrelated changes and files.
|
and there are no accidentally committed unrelated changes and files.
|
||||||
|
|
||||||
Push the necessary fixup commits or force-push to your branch if needed.
|
Push the necessary fixup commits or force-push to your branch if needed.
|
||||||
|
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ char* dc_get_blobdir (const dc_context_t* context);
|
|||||||
* - `e2ee_enabled` = 0=no end-to-end-encryption, 1=prefer end-to-end-encryption (default)
|
* - `e2ee_enabled` = 0=no end-to-end-encryption, 1=prefer end-to-end-encryption (default)
|
||||||
* - `mdns_enabled` = 0=do not send or request read receipts,
|
* - `mdns_enabled` = 0=do not send or request read receipts,
|
||||||
* 1=send and request read receipts
|
* 1=send and request read receipts
|
||||||
* default=send and request read receipts, only send but not reuqest if `bot` is set
|
* default=send and request read receipts, only send but not request if `bot` is set
|
||||||
* - `bcc_self` = 0=do not send a copy of outgoing messages to self,
|
* - `bcc_self` = 0=do not send a copy of outgoing messages to self,
|
||||||
* 1=send a copy of outgoing messages to self (default).
|
* 1=send a copy of outgoing messages to self (default).
|
||||||
* Sending messages to self is needed for a proper multi-account setup,
|
* Sending messages to self is needed for a proper multi-account setup,
|
||||||
@@ -985,7 +985,7 @@ uint32_t dc_get_chat_id_by_contact_id (dc_context_t* context, uint32_t co
|
|||||||
* If the increation-method is not used - which is probably the normal case -
|
* If the increation-method is not used - which is probably the normal case -
|
||||||
* dc_send_msg() copies the file to the blob directory if it is not yet there.
|
* dc_send_msg() copies the file to the blob directory if it is not yet there.
|
||||||
* To distinguish the two cases, msg->state must be set properly. The easiest
|
* To distinguish the two cases, msg->state must be set properly. The easiest
|
||||||
* way to ensure this is to re-use the same object for both calls.
|
* way to ensure this is to reuse the same object for both calls.
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* ~~~
|
* ~~~
|
||||||
@@ -4706,7 +4706,7 @@ int dc_msg_has_html (dc_msg_t* msg);
|
|||||||
* If the download fails or succeeds,
|
* If the download fails or succeeds,
|
||||||
* the event @ref DC_EVENT_MSGS_CHANGED is emitted.
|
* the event @ref DC_EVENT_MSGS_CHANGED is emitted.
|
||||||
*
|
*
|
||||||
* - @ref DC_DOWNLOAD_UNDECIPHERABLE - The message does not need any futher download action.
|
* - @ref DC_DOWNLOAD_UNDECIPHERABLE - The message does not need any further download action.
|
||||||
* It was fully downloaded, but we failed to decrypt it.
|
* It was fully downloaded, but we failed to decrypt it.
|
||||||
* - @ref DC_DOWNLOAD_FAILURE - Download error, the user may start over calling dc_download_full_msg() again.
|
* - @ref DC_DOWNLOAD_FAILURE - Download error, the user may start over calling dc_download_full_msg() again.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ pub enum EventType {
|
|||||||
/// or for functions that are expected to fail (eg. autocryptContinueKeyTransfer())
|
/// or for functions that are expected to fail (eg. autocryptContinueKeyTransfer())
|
||||||
/// it might be better to delay showing these events until the function has really
|
/// it might be better to delay showing these events until the function has really
|
||||||
/// failed (returned false). It should be sufficient to report only the *last* error
|
/// failed (returned false). It should be sufficient to report only the *last* error
|
||||||
/// in a messasge box then.
|
/// in a message box then.
|
||||||
Error { msg: String },
|
Error { msg: String },
|
||||||
|
|
||||||
/// An action cannot be performed because the user is not in the group.
|
/// An action cannot be performed because the user is not in the group.
|
||||||
|
|||||||
@@ -65,13 +65,13 @@ so by default it uses the prebuilds.
|
|||||||
- this will run `update_optional_dependencies_and_version.js` (in the `prepack` script),
|
- this will run `update_optional_dependencies_and_version.js` (in the `prepack` script),
|
||||||
which puts all platform packages into `optionalDependencies` and updates the `version` in `package.json`
|
which puts all platform packages into `optionalDependencies` and updates the `version` in `package.json`
|
||||||
|
|
||||||
## How to build a version you can use localy on your host machine for development
|
## How to build a version you can use locally on your host machine for development
|
||||||
|
|
||||||
You can not install the npm packet from the previous section locally, unless you have a local npm registry set up where you upload it too. This is why we have seperate scripts for making it work for local installation.
|
You can not install the npm packet from the previous section locally, unless you have a local npm registry set up where you upload it too. This is why we have separate scripts for making it work for local installation.
|
||||||
|
|
||||||
- If you just need your host platform run `python scripts/make_local_dev_version.py`
|
- If you just need your host platform run `python scripts/make_local_dev_version.py`
|
||||||
- note: this clears the `platform_package` folder
|
- note: this clears the `platform_package` folder
|
||||||
- (advanced) If you need more than one platform for local install you can just run `node scripts/update_optional_dependencies_and_version.js` after building multiple plaftorms with `build_platform_package.py`
|
- (advanced) If you need more than one platform for local install you can just run `node scripts/update_optional_dependencies_and_version.js` after building multiple platforms with `build_platform_package.py`
|
||||||
|
|
||||||
## Thanks to nlnet
|
## Thanks to nlnet
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ const expected_cwd = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|||||||
|
|
||||||
if (process.cwd() !== expected_cwd) {
|
if (process.cwd() !== expected_cwd) {
|
||||||
console.error(
|
console.error(
|
||||||
"CWD missmatch: this script needs to be run from " + expected_cwd,
|
"CWD mismatch: this script needs to be run from " + expected_cwd,
|
||||||
{ actual: process.cwd(), expected: expected_cwd }
|
{ actual: process.cwd(), expected: expected_cwd }
|
||||||
);
|
);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
@@ -40,7 +40,7 @@ const platform_package_names = await Promise.all(
|
|||||||
"has a different version than the version of the rpc server.",
|
"has a different version than the version of the rpc server.",
|
||||||
{ rpc_server: version, platform_package: p.version }
|
{ rpc_server: version, platform_package: p.version }
|
||||||
);
|
);
|
||||||
throw new Error("version missmatch");
|
throw new Error("version mismatch");
|
||||||
}
|
}
|
||||||
return { folder_name: name, package_name: p.name };
|
return { folder_name: name, package_name: p.name };
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ async fn main_impl() -> Result<()> {
|
|||||||
|
|
||||||
// Logs from `log` crate and traces from `tracing` crate
|
// Logs from `log` crate and traces from `tracing` crate
|
||||||
// are configurable with `RUST_LOG` environment variable
|
// are configurable with `RUST_LOG` environment variable
|
||||||
// and go to stderr to avoid interferring with JSON-RPC using stdout.
|
// and go to stderr to avoid interfering with JSON-RPC using stdout.
|
||||||
tracing_subscriber::fmt()
|
tracing_subscriber::fmt()
|
||||||
.with_env_filter(EnvFilter::from_default_env())
|
.with_env_filter(EnvFilter::from_default_env())
|
||||||
.with_writer(std::io::stderr)
|
.with_writer(std::io::stderr)
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ class TestProcess:
|
|||||||
|
|
||||||
def get_liveconfig_producer(self):
|
def get_liveconfig_producer(self):
|
||||||
"""provide live account configs, cached on a per-test-process scope
|
"""provide live account configs, cached on a per-test-process scope
|
||||||
so that test functions can re-use already known live configs.
|
so that test functions can reuse already known live configs.
|
||||||
"""
|
"""
|
||||||
chatmail_opt = self.pytestconfig.getoption("--chatmail")
|
chatmail_opt = self.pytestconfig.getoption("--chatmail")
|
||||||
if chatmail_opt:
|
if chatmail_opt:
|
||||||
|
|||||||
@@ -1399,7 +1399,7 @@ impl ChatId {
|
|||||||
///
|
///
|
||||||
/// `message_timestamp` should be either the message "sent" timestamp or a timestamp of the
|
/// `message_timestamp` should be either the message "sent" timestamp or a timestamp of the
|
||||||
/// corresponding event in case of a system message (usually the current system time).
|
/// corresponding event in case of a system message (usually the current system time).
|
||||||
/// `always_sort_to_bottom` makes this ajust the returned timestamp up so that the message goes
|
/// `always_sort_to_bottom` makes this adjust the returned timestamp up so that the message goes
|
||||||
/// to the chat bottom.
|
/// to the chat bottom.
|
||||||
/// `received` -- whether the message is received. Otherwise being sent.
|
/// `received` -- whether the message is received. Otherwise being sent.
|
||||||
/// `incoming` -- whether the message is incoming.
|
/// `incoming` -- whether the message is incoming.
|
||||||
@@ -4495,7 +4495,7 @@ pub(crate) async fn delete_and_reset_all_device_msgs(context: &Context) -> Resul
|
|||||||
.await?;
|
.await?;
|
||||||
context.sql.execute("DELETE FROM devmsglabels;", ()).await?;
|
context.sql.execute("DELETE FROM devmsglabels;", ()).await?;
|
||||||
|
|
||||||
// Insert labels for welcome messages to avoid them being readded on reconfiguration.
|
// Insert labels for welcome messages to avoid them being re-added on reconfiguration.
|
||||||
context
|
context
|
||||||
.sql
|
.sql
|
||||||
.execute(
|
.execute(
|
||||||
@@ -4709,7 +4709,7 @@ impl Context {
|
|||||||
|
|
||||||
/// Emits the appropriate `MsgsChanged` event. Should be called if the number of unnoticed
|
/// Emits the appropriate `MsgsChanged` event. Should be called if the number of unnoticed
|
||||||
/// archived chats could decrease. In general we don't want to make an extra db query to know if
|
/// archived chats could decrease. In general we don't want to make an extra db query to know if
|
||||||
/// a noticied chat is archived. Emitting events should be cheap, a false-positive `MsgsChanged`
|
/// a noticed chat is archived. Emitting events should be cheap, a false-positive `MsgsChanged`
|
||||||
/// is ok.
|
/// is ok.
|
||||||
pub(crate) fn on_archived_chats_maybe_noticed(&self) {
|
pub(crate) fn on_archived_chats_maybe_noticed(&self) {
|
||||||
self.emit_msgs_changed(DC_CHAT_ID_ARCHIVED_LINK, MsgId::new(0));
|
self.emit_msgs_changed(DC_CHAT_ID_ARCHIVED_LINK, MsgId::new(0));
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ pub enum Config {
|
|||||||
/// SMTP server security (e.g. TLS, STARTTLS).
|
/// SMTP server security (e.g. TLS, STARTTLS).
|
||||||
SendSecurity,
|
SendSecurity,
|
||||||
|
|
||||||
/// Deprecated option for backwards compatibilty.
|
/// Deprecated option for backwards compatibility.
|
||||||
///
|
///
|
||||||
/// Certificate checks for SMTP are actually controlled by `imap_certificate_checks` config.
|
/// Certificate checks for SMTP are actually controlled by `imap_certificate_checks` config.
|
||||||
SmtpCertificateChecks,
|
SmtpCertificateChecks,
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ impl ContactId {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns contact adress.
|
/// Returns contact address.
|
||||||
pub async fn addr(&self, context: &Context) -> Result<String> {
|
pub async fn addr(&self, context: &Context) -> Result<String> {
|
||||||
let addr = context
|
let addr = context
|
||||||
.sql
|
.sql
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ pub enum EventType {
|
|||||||
/// or for functions that are expected to fail (eg. dc_continue_key_transfer())
|
/// or for functions that are expected to fail (eg. dc_continue_key_transfer())
|
||||||
/// it might be better to delay showing these events until the function has really
|
/// it might be better to delay showing these events until the function has really
|
||||||
/// failed (returned false). It should be sufficient to report only the *last* error
|
/// failed (returned false). It should be sufficient to report only the *last* error
|
||||||
/// in a messasge box then.
|
/// in a message box then.
|
||||||
Error(String),
|
Error(String),
|
||||||
|
|
||||||
/// An action cannot be performed because the user is not in the group.
|
/// An action cannot be performed because the user is not in the group.
|
||||||
|
|||||||
@@ -724,7 +724,7 @@ impl Message {
|
|||||||
/// `contact_id` set to [`ContactId::SELF`].
|
/// `contact_id` set to [`ContactId::SELF`].
|
||||||
///
|
///
|
||||||
/// `latitude` is the North-south position of the location.
|
/// `latitude` is the North-south position of the location.
|
||||||
/// `longitutde` is the East-west position of the location.
|
/// `longitude` is the East-west position of the location.
|
||||||
///
|
///
|
||||||
/// [`location::set()`]: crate::location::set
|
/// [`location::set()`]: crate::location::set
|
||||||
/// [`send_locations_to_chat()`]: crate::location::send_locations_to_chat
|
/// [`send_locations_to_chat()`]: crate::location::send_locations_to_chat
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ impl MimeFactory {
|
|||||||
let gossip_period = context.get_config_i64(Config::GossipPeriod).await?;
|
let gossip_period = context.get_config_i64(Config::GossipPeriod).await?;
|
||||||
// `gossip_period == 0` is a special case for testing,
|
// `gossip_period == 0` is a special case for testing,
|
||||||
// enabling gossip in every message.
|
// enabling gossip in every message.
|
||||||
// Othewise "smeared timestamps" may result in the condition
|
// Otherwise "smeared timestamps" may result in the condition
|
||||||
// to fail even if the clock is monotonic.
|
// to fail even if the clock is monotonic.
|
||||||
if gossip_period == 0 || time() >= gossiped_timestamp + gossip_period {
|
if gossip_period == 0 || time() >= gossiped_timestamp + gossip_period {
|
||||||
Ok(true)
|
Ok(true)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ pub(crate) async fn prune_connection_history(context: &Context) -> Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Update the timestamp of the last successfull connection
|
/// Update the timestamp of the last successful connection
|
||||||
/// to the given `host` and `port`
|
/// to the given `host` and `port`
|
||||||
/// with the given application protocol `alpn`.
|
/// with the given application protocol `alpn`.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ where
|
|||||||
.get(9..12)
|
.get(9..12)
|
||||||
.context("HTTP status line does not contain a status code")?;
|
.context("HTTP status line does not contain a status code")?;
|
||||||
|
|
||||||
// Interpert status code according to
|
// Interpret status code according to
|
||||||
// <https://datatracker.ietf.org/doc/html/rfc7231#section-6>.
|
// <https://datatracker.ietf.org/doc/html/rfc7231#section-6>.
|
||||||
if status_code == b"407" {
|
if status_code == b"407" {
|
||||||
Err(format_err!("Proxy Authentication Required"))
|
Err(format_err!("Proxy Authentication Required"))
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
//! when it's not required. Only when a webxdc subscribes to realtime data or when a reatlime message is sent,
|
//! when it's not required. Only when a webxdc subscribes to realtime data or when a reatlime message is sent,
|
||||||
//! the p2p machinery should be started.
|
//! the p2p machinery should be started.
|
||||||
//!
|
//!
|
||||||
//! Adding peer channels to webxdc needs upfront negotation of a topic and sharing of public keys so that
|
//! Adding peer channels to webxdc needs upfront negotiation of a topic and sharing of public keys so that
|
||||||
//! nodes can connect to each other. The explicit approach is as follows:
|
//! nodes can connect to each other. The explicit approach is as follows:
|
||||||
//!
|
//!
|
||||||
//! 1. We introduce a new [`IrohGossipTopic`](crate::headerdef::HeaderDef::IrohGossipTopic) message header with a random 32-byte TopicId,
|
//! 1. We introduce a new [`IrohGossipTopic`](crate::headerdef::HeaderDef::IrohGossipTopic) message header with a random 32-byte TopicId,
|
||||||
@@ -935,7 +935,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// channel is only used to remeber if an advertisement has been sent
|
// channel is only used to remember if an advertisement has been sent
|
||||||
// bob for example does not change the channels because he never sends an
|
// bob for example does not change the channels because he never sends an
|
||||||
// advertisement
|
// advertisement
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
|||||||
@@ -1356,7 +1356,7 @@ async fn add_parts(
|
|||||||
// 1. They can't be an attack (they are outgoing, not incoming)
|
// 1. They can't be an attack (they are outgoing, not incoming)
|
||||||
// 2. Probably the unencryptedness is just a temporary state, after all
|
// 2. Probably the unencryptedness is just a temporary state, after all
|
||||||
// the user obviously still uses DC
|
// the user obviously still uses DC
|
||||||
// -> Showing info messages everytime would be a lot of noise
|
// -> Showing info messages every time would be a lot of noise
|
||||||
// 3. The info messages that are shown to the user ("Your chat partner
|
// 3. The info messages that are shown to the user ("Your chat partner
|
||||||
// likely reinstalled DC" or similar) would be wrong.
|
// likely reinstalled DC" or similar) would be wrong.
|
||||||
if chat.is_protected() && (mime_parser.incoming || chat.typ != Chattype::Single) {
|
if chat.is_protected() && (mime_parser.incoming || chat.typ != Chattype::Single) {
|
||||||
|
|||||||
@@ -4033,7 +4033,7 @@ async fn test_sync_member_list_on_rejoin() -> Result<()> {
|
|||||||
remove_contact_from_chat(&alice, alice_chat_id, claire_id).await?;
|
remove_contact_from_chat(&alice, alice_chat_id, claire_id).await?;
|
||||||
alice.pop_sent_msg().await;
|
alice.pop_sent_msg().await;
|
||||||
|
|
||||||
// readd bob
|
// re-add bob
|
||||||
add_contact_to_chat(&alice, alice_chat_id, bob_id).await?;
|
add_contact_to_chat(&alice, alice_chat_id, bob_id).await?;
|
||||||
let add2 = alice.pop_sent_msg().await;
|
let add2 = alice.pop_sent_msg().await;
|
||||||
bob.recv_msg(&add2).await;
|
bob.recv_msg(&add2).await;
|
||||||
@@ -4182,7 +4182,7 @@ async fn test_recreate_contact_list_on_missing_message() -> Result<()> {
|
|||||||
// since we missed a message, a new contact list should be build
|
// since we missed a message, a new contact list should be build
|
||||||
assert_eq!(get_chat_contacts(&alice, chat_id).await?.len(), 3);
|
assert_eq!(get_chat_contacts(&alice, chat_id).await?.len(), 3);
|
||||||
|
|
||||||
// readd fiona
|
// re-add fiona
|
||||||
add_contact_to_chat(&alice, chat_id, alice_fiona).await?;
|
add_contact_to_chat(&alice, chat_id, alice_fiona).await?;
|
||||||
|
|
||||||
// delayed removal of fiona shouldn't remove her
|
// delayed removal of fiona shouldn't remove her
|
||||||
@@ -4224,7 +4224,7 @@ async fn test_dont_readd_with_normal_msg() -> Result<()> {
|
|||||||
bob.recv_msg(&alice.pop_sent_msg().await).await;
|
bob.recv_msg(&alice.pop_sent_msg().await).await;
|
||||||
|
|
||||||
// Alice didn't receive Bob's leave message although a lot of time has
|
// Alice didn't receive Bob's leave message although a lot of time has
|
||||||
// passed, so Bob must readd themselves otherwise other members would think
|
// passed, so Bob must re-add themselves otherwise other members would think
|
||||||
// Bob is still here while they aren't. Bob should retry to leave if they
|
// Bob is still here while they aren't. Bob should retry to leave if they
|
||||||
// think that Alice didn't re-add them on purpose (which is possible if Alice uses a classical
|
// think that Alice didn't re-add them on purpose (which is possible if Alice uses a classical
|
||||||
// MUA).
|
// MUA).
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ impl InnerPool {
|
|||||||
/// Retrieves a connection from the pool.
|
/// Retrieves a connection from the pool.
|
||||||
///
|
///
|
||||||
/// Sets `query_only` pragma to the provided value
|
/// Sets `query_only` pragma to the provided value
|
||||||
/// to prevent accidentaly misuse of connection
|
/// to prevent accidental misuse of connection
|
||||||
/// for writing when reading is intended.
|
/// for writing when reading is intended.
|
||||||
/// Only pass `query_only=false` if you want
|
/// Only pass `query_only=false` if you want
|
||||||
/// to use the connection for writing.
|
/// to use the connection for writing.
|
||||||
|
|||||||
@@ -541,7 +541,7 @@ impl ContactId {
|
|||||||
.unwrap_or_else(|_| self.to_string())
|
.unwrap_or_else(|_| self.to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get contact name, e.g. `Bob`, or `bob@exmple.net` if no name is set.
|
/// Get contact name, e.g. `Bob`, or `bob@example.net` if no name is set.
|
||||||
async fn get_stock_name(self, context: &Context) -> String {
|
async fn get_stock_name(self, context: &Context) -> String {
|
||||||
Contact::get_by_id(context, self)
|
Contact::get_by_id(context, self)
|
||||||
.await
|
.await
|
||||||
|
|||||||
@@ -618,7 +618,7 @@ impl TestContext {
|
|||||||
.filter(|msg| msg.chat_id != DC_CHAT_ID_TRASH)
|
.filter(|msg| msg.chat_id != DC_CHAT_ID_TRASH)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Recevies a message and asserts that it goes to trash chat.
|
/// Receives a message and asserts that it goes to trash chat.
|
||||||
pub async fn recv_msg_trash(&self, msg: &SentMessage<'_>) {
|
pub async fn recv_msg_trash(&self, msg: &SentMessage<'_>) {
|
||||||
let received = receive_imf(self, msg.payload().as_bytes(), false)
|
let received = receive_imf(self, msg.payload().as_bytes(), false)
|
||||||
.await
|
.await
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ async fn test_aeap_replay_attack() -> Result<()> {
|
|||||||
chat::add_contact_to_chat(&bob, group, bob_alice_contact).await?;
|
chat::add_contact_to_chat(&bob, group, bob_alice_contact).await?;
|
||||||
|
|
||||||
// Alice sends a message which Bob doesn't receive or something
|
// Alice sends a message which Bob doesn't receive or something
|
||||||
// A real attack would rather re-use a message that was sent to a group
|
// A real attack would rather reuse a message that was sent to a group
|
||||||
// and replace the Message-Id or so.
|
// and replace the Message-Id or so.
|
||||||
let chat = alice.create_chat(&bob).await;
|
let chat = alice.create_chat(&bob).await;
|
||||||
let sent = alice.send_text(chat.id, "whoop whoop").await;
|
let sent = alice.send_text(chat.id, "whoop whoop").await;
|
||||||
|
|||||||
Reference in New Issue
Block a user