Update to 0.19.5 and include optional thumbnail
This commit is contained in:
parent
7dcc7bfee2
commit
2ecfe88cb9
5 changed files with 378 additions and 109 deletions
src
|
@ -2,8 +2,8 @@ use std::path::PathBuf;
|
|||
use std::sync::{Arc, RwLock};
|
||||
use chrono::{Timelike, Utc};
|
||||
use crate::config::PostBody::Description;
|
||||
use lemmy_api_common::sensitive::Sensitive;
|
||||
use lemmy_db_schema::PostFeatureType;
|
||||
use lemmy_db_schema::sensitive::SensitiveString;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use crate::lemmy::{Lemmy, PartInfo, PostType};
|
||||
use crate::post_history::{SeriesHistory};
|
||||
|
@ -50,8 +50,8 @@ macro_rules! error {
|
|||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||
pub(crate) struct Config {
|
||||
pub(crate) instance: String,
|
||||
username: String,
|
||||
password: String,
|
||||
username: SensitiveString,
|
||||
password: SensitiveString,
|
||||
pub(crate) status_post_url: Option<String>,
|
||||
pub(crate) config_reload_seconds: u32,
|
||||
pub(crate) protected_communities: Vec<String>,
|
||||
|
@ -89,12 +89,12 @@ impl Config {
|
|||
confy::get_configuration_file_path(env!("CARGO_PKG_NAME"), "config").expect("Application will not without confy")
|
||||
}
|
||||
|
||||
pub(crate) fn get_username(&self) -> Sensitive<String> {
|
||||
Sensitive::new(self.username.clone())
|
||||
pub(crate) fn get_username(&self) -> SensitiveString {
|
||||
self.username.clone()
|
||||
}
|
||||
|
||||
pub(crate) fn get_password(&self) -> Sensitive<String> {
|
||||
Sensitive::new(self.password.clone())
|
||||
pub(crate) fn get_password(&self) -> SensitiveString {
|
||||
self.password.clone()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,8 +102,8 @@ impl Default for Config {
|
|||
fn default() -> Self {
|
||||
Config {
|
||||
instance: "".to_owned(),
|
||||
username: "".to_owned(),
|
||||
password: "".to_owned(),
|
||||
username: SensitiveString::from("".to_owned()),
|
||||
password: SensitiveString::from("".to_owned()),
|
||||
status_post_url: None,
|
||||
config_reload_seconds: 21600,
|
||||
protected_communities: vec![],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue