made the Option<> changes and some stylistics

This commit is contained in:
Anish Nayak
2025-08-13 15:36:57 +01:00
parent bacdc8ea0f
commit e7d380f391
10 changed files with 29 additions and 21 deletions
+13 -12
View File
@@ -195,36 +195,36 @@ impl From<TwilightUser> for User {
pub struct Message {
pub id: i64,
pub author_id: i64,
pub author_name: Option<String>,
pub author_avatar_url: Option<String>,
pub author_name: String,
pub author_avatar_url: String,
pub author_mask: Option<String>,
pub content: Option<String>,
pub content: String,
pub attachments: Option<Vec<String>>,
pub sticker: Option<i64>,
pub propagation_message_id: Option<i64>,
pub propagation_channel_id: Option<i64>,
pub replying_to_id: Option<i64>,
pub is_deleted: Option<bool>,
pub is_edited: Option<bool>,
pub is_censored: Option<bool>,
pub is_deleted: bool,
pub is_edited: bool,
pub is_censored: bool,
}
impl<'a> Object<'a> for Message {
type Row = (
i64,
i64,
String,
String,
Option<String>,
Option<String>,
Option<String>,
Option<String>,
String,
Option<Vec<String>>,
Option<i64>,
Option<i64>,
Option<i64>,
Option<i64>,
Option<bool>,
Option<bool>,
Option<bool>,
bool,
bool,
bool,
);
fn from_row(row: Self::Row) -> Self {
Self {
@@ -398,6 +398,7 @@ impl Report {
)
.await
.map_err(DatabaseError::QueryError)?;
Ok(())
}
}