talk_loco_client/talk/stream/
command.rs1use serde::Deserialize;
2
3use crate::talk::{channel::ChannelMeta, chat::Chatlog, session::channel::info::ChannelInfo};
4
5#[derive(Debug, Clone, Deserialize, PartialEq)]
7pub struct Kickout {
8 pub reason: i32,
14}
15
16#[derive(Debug, Clone, Deserialize, PartialEq)]
18pub struct Msg {
19 #[serde(rename = "chatId")]
21 pub chat_id: i64,
22
23 #[serde(rename = "chatLog")]
24 pub chatlog: Chatlog,
25
26 #[serde(rename = "authorNickname")]
28 pub author_nickname: Option<String>,
29
30 #[serde(rename = "noSeen")]
34 pub no_seen: bool,
35
36 #[serde(rename = "li")]
37 pub link_id: Option<i64>,
38
39 #[serde(rename = "notiRead")]
42 pub noti_read: Option<bool>,
43}
44
45#[derive(Debug, Clone, Deserialize, PartialEq)]
47pub struct DecunRead {
48 #[serde(rename = "chatId")]
50 pub chat_id: i64,
51
52 #[serde(rename = "userId")]
54 pub user_id: i64,
55
56 pub watermark: i64,
60}
61
62#[derive(Debug, Clone, Deserialize, PartialEq)]
64pub struct ChgMeta {
65 #[serde(rename = "chatId")]
67 pub chat_id: i64,
68
69 pub meta: ChannelMeta,
71}
72
73#[derive(Debug, Clone, Deserialize, PartialEq)]
75pub struct SyncJoin {
76 #[serde(rename = "c")]
78 pub chat_id: i64,
79
80 #[serde(rename = "chatLog")]
82 pub chatlog: Option<Chatlog>,
83}
84
85#[derive(Debug, Clone, Deserialize, PartialEq)]
87pub struct SyncDlMsg {
88 #[serde(rename = "chatLog")]
90 pub chatlog: Chatlog,
91}
92
93#[derive(Debug, Clone, Deserialize, PartialEq)]
95pub struct SyncLinkCr {
96 #[serde(rename = "ol")]
98 pub link_id: i64,
99
100 #[serde(rename = "chatRoom")]
102 pub chat_room: Option<ChannelInfo>,
103}
104
105#[derive(Debug, Clone, Deserialize, PartialEq)]
107pub struct SyncMemT {
108 #[serde(rename = "c")]
110 pub chat_id: i64,
111
112 #[serde(rename = "li")]
114 pub link_id: i64,
115
116 #[serde(rename = "mids")]
118 pub member_ids: Vec<i64>,
119
120 #[serde(rename = "mts")]
123 pub mem_types: Vec<i32>,
124}
125
126#[derive(Debug, Clone, Deserialize, PartialEq)]
128pub struct SyncLinkPf {
129 #[serde(rename = "c")]
131 pub chat_id: i64,
132
133 #[serde(rename = "li")]
135 pub link_id: i64,
136}
137
138#[derive(Debug, Clone, Deserialize, PartialEq)]
140pub struct SyncRewr {
141 #[serde(rename = "chatLog")]
143 pub chat_log: Chatlog,
144}
145
146#[derive(Debug, Clone, Deserialize, PartialEq)]
147pub struct Left {
148 #[serde(rename = "chatId")]
149 pub chat_id: i64,
150
151 #[serde(rename = "lastTokenId")]
152 pub last_token_id: i64,
153}