Skip to content

Commit e099e36

Browse files
committed
rename JSONRPCChatType to JsonrpcChatType
1 parent f12a03f commit e099e36

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

deltachat-jsonrpc/src/api/types/chat.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub struct FullChat {
5757
archived: bool,
5858
pinned: bool,
5959
// subtitle - will be moved to frontend because it uses translation functions
60-
chat_type: JSONRPCChatType,
60+
chat_type: JsonrpcChatType,
6161
is_unpromoted: bool,
6262
is_self_talk: bool,
6363
contacts: Vec<ContactObject>,
@@ -209,7 +209,7 @@ pub struct BasicChat {
209209
profile_image: Option<String>, //BLOBS ?
210210
archived: bool,
211211
pinned: bool,
212-
chat_type: JSONRPCChatType,
212+
chat_type: JsonrpcChatType,
213213
is_unpromoted: bool,
214214
is_self_talk: bool,
215215
color: String,
@@ -295,34 +295,34 @@ impl JSONRPCChatVisibility {
295295

296296
#[derive(Clone, Serialize, Deserialize, PartialEq, TypeDef, schemars::JsonSchema)]
297297
#[serde(rename = "ChatType")]
298-
pub enum JSONRPCChatType {
298+
pub enum JsonrpcChatType {
299299
Single,
300300
Group,
301301
Mailinglist,
302302
OutBroadcast,
303303
InBroadcast,
304304
}
305305

306-
impl From<Chattype> for JSONRPCChatType {
306+
impl From<Chattype> for JsonrpcChatType {
307307
fn from(chattype: Chattype) -> Self {
308308
match chattype {
309-
Chattype::Single => JSONRPCChatType::Single,
310-
Chattype::Group => JSONRPCChatType::Group,
311-
Chattype::Mailinglist => JSONRPCChatType::Mailinglist,
312-
Chattype::OutBroadcast => JSONRPCChatType::OutBroadcast,
313-
Chattype::InBroadcast => JSONRPCChatType::InBroadcast,
309+
Chattype::Single => JsonrpcChatType::Single,
310+
Chattype::Group => JsonrpcChatType::Group,
311+
Chattype::Mailinglist => JsonrpcChatType::Mailinglist,
312+
Chattype::OutBroadcast => JsonrpcChatType::OutBroadcast,
313+
Chattype::InBroadcast => JsonrpcChatType::InBroadcast,
314314
}
315315
}
316316
}
317317

318-
impl From<JSONRPCChatType> for Chattype {
319-
fn from(chattype: JSONRPCChatType) -> Self {
318+
impl From<JsonrpcChatType> for Chattype {
319+
fn from(chattype: JsonrpcChatType) -> Self {
320320
match chattype {
321-
JSONRPCChatType::Single => Chattype::Single,
322-
JSONRPCChatType::Group => Chattype::Group,
323-
JSONRPCChatType::Mailinglist => Chattype::Mailinglist,
324-
JSONRPCChatType::OutBroadcast => Chattype::OutBroadcast,
325-
JSONRPCChatType::InBroadcast => Chattype::InBroadcast,
321+
JsonrpcChatType::Single => Chattype::Single,
322+
JsonrpcChatType::Group => Chattype::Group,
323+
JsonrpcChatType::Mailinglist => Chattype::Mailinglist,
324+
JsonrpcChatType::OutBroadcast => Chattype::OutBroadcast,
325+
JsonrpcChatType::InBroadcast => Chattype::InBroadcast,
326326
}
327327
}
328328
}

deltachat-jsonrpc/src/api/types/chat_list.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use num_traits::cast::ToPrimitive;
1111
use serde::Serialize;
1212
use typescript_type_def::TypeDef;
1313

14-
use super::chat::JSONRPCChatType;
14+
use super::chat::JsonrpcChatType;
1515
use super::color_int_to_hex_string;
1616
use super::message::MessageViewtype;
1717

@@ -24,7 +24,7 @@ pub enum ChatListItemFetchResult {
2424
name: String,
2525
avatar_path: Option<String>,
2626
color: String,
27-
chat_type: JSONRPCChatType,
27+
chat_type: JsonrpcChatType,
2828
last_updated: Option<i64>,
2929
summary_text1: String,
3030
summary_text2: String,

deltachat-jsonrpc/src/api/types/events.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use deltachat::{Event as CoreEvent, EventType as CoreEventType};
22
use serde::Serialize;
33
use typescript_type_def::TypeDef;
44

5-
use super::chat::JSONRPCChatType;
5+
use super::chat::JsonrpcChatType;
66

77
#[derive(Serialize, TypeDef, schemars::JsonSchema)]
88
#[serde(rename_all = "camelCase")]
@@ -308,7 +308,7 @@ pub enum EventType {
308308
/// The type of the joined chat.
309309
/// This can take the same values
310310
/// as `BasicChat.chatType` ([`crate::api::types::chat::BasicChat::chat_type`]).
311-
chat_type: JSONRPCChatType,
311+
chat_type: JsonrpcChatType,
312312
/// ID of the chat in case of success.
313313
chat_id: u32,
314314

deltachat-jsonrpc/src/api/types/message.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use num_traits::cast::ToPrimitive;
1616
use serde::{Deserialize, Serialize};
1717
use typescript_type_def::TypeDef;
1818

19-
use super::chat::JSONRPCChatType;
19+
use super::chat::JsonrpcChatType;
2020
use super::color_int_to_hex_string;
2121
use super::contact::ContactObject;
2222
use super::reactions::JSONRPCReactions;
@@ -532,7 +532,7 @@ pub struct MessageSearchResult {
532532
chat_profile_image: Option<String>,
533533
chat_color: String,
534534
chat_name: String,
535-
chat_type: JSONRPCChatType,
535+
chat_type: JsonrpcChatType,
536536
is_chat_protected: bool,
537537
is_chat_contact_request: bool,
538538
is_chat_archived: bool,

0 commit comments

Comments
 (0)