Minor cleanup of Viewtype

Provide checking for attachment as a method and move it to the message
module.  The method is a lot easier to read and have correct
expectations about.
This commit is contained in:
Floris Bruynooghe
2022-03-06 17:54:23 +01:00
parent 50f13cb84b
commit f9ee70aa2e
28 changed files with 204 additions and 201 deletions

View File

@@ -400,15 +400,14 @@ pub async fn ensure_secret_key_exists(context: &Context) -> Result<String> {
#[cfg(test)]
mod tests {
use super::*;
use crate::chat;
use crate::constants::Viewtype;
use crate::message::Message;
use crate::message::{Message, Viewtype};
use crate::param::Param;
use crate::peerstate::ToSave;
use crate::test_utils::{bob_keypair, TestContext};
use super::*;
mod ensure_secret_key_exists {
use super::*;