push 2 for replied-to messages *am i cooked or am i cooking*
This commit is contained in:
@@ -12,10 +12,55 @@ pub struct MessageMetadata {
|
||||
pub propagation_message_id: Option<i64>,
|
||||
pub propagation_channel_id: Option<i64>,
|
||||
pub replying_to_id: Option<i64>,
|
||||
pub message_replied_to_metadata: Option<Box<MessageMetadata>>,
|
||||
pub is_deleted: Option<bool>,
|
||||
pub is_edited: Option<bool>,
|
||||
pub is_censored: Option<bool>,
|
||||
}
|
||||
|
||||
impl<'a> Object<'a> for MessageMetadata {
|
||||
type Row = (
|
||||
i64, i64, Option<String>, Option<String>, Option<String>, Option<String>, Option<Vec<String>>, Option<i64>, Option<i64>, Option<i64>, Option<i64>, Option<Box<MessageMetadata>>, Option<bool>, Option<bool>, Option<bool>
|
||||
);
|
||||
fn from_row(row: Self::Row) -> Self {
|
||||
Self {
|
||||
call_id: row.0,
|
||||
author_id: row.1,
|
||||
author_name: row.2,
|
||||
author_avatar_url: row.3,
|
||||
author_mask: row.4,
|
||||
content: row.5,
|
||||
attachments: row.6,
|
||||
sticker: row.7,
|
||||
propagation_message_id: row.8,
|
||||
propagation_channel_id: row.9,
|
||||
replying_to_id: row.10,
|
||||
message_replied_to_metadata: row.11,
|
||||
is_deleted: row.12,
|
||||
is_edited: row.13,
|
||||
is_censored: row.14,
|
||||
}
|
||||
}
|
||||
fn to_row(value: Self) -> Self::Row {
|
||||
(
|
||||
value.call_id,
|
||||
value.author_id,
|
||||
value.author_name,
|
||||
value.author_avatar_url,
|
||||
value.author_mask,
|
||||
value.content,
|
||||
value.attachments,
|
||||
value.sticker,
|
||||
value.propagation_message_id,
|
||||
value.propagation_channel_id,
|
||||
value.replying_to_id,
|
||||
value.message_replied_to_metadata,
|
||||
value.is_deleted,
|
||||
value.is_edited,
|
||||
value.is_censored,
|
||||
)
|
||||
}
|
||||
}
|
||||
use scylla::{
|
||||
client::session::Session,
|
||||
deserialize::row::DeserializeRow,
|
||||
|
||||
Reference in New Issue
Block a user