mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
Add last_message for DMs.
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct LastMessage {
|
||||
id: String,
|
||||
user_id: String,
|
||||
short_content: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct Channel {
|
||||
#[serde(rename = "_id")]
|
||||
@@ -7,12 +14,11 @@ pub struct Channel {
|
||||
#[serde(rename = "type")]
|
||||
pub channel_type: u8,
|
||||
|
||||
pub last_message: Option<String>,
|
||||
|
||||
// for Direct Messages
|
||||
pub active: Option<bool>,
|
||||
|
||||
// for DMs / GDMs
|
||||
pub last_message: Option<LastMessage>,
|
||||
pub recipients: Option<Vec<String>>,
|
||||
|
||||
// for GDMs
|
||||
|
||||
Reference in New Issue
Block a user