Skip to content

Commit a58cc42

Browse files
committed
rename JSONRPCChatType to JsonrpcChatType
1 parent b1cfd3a commit a58cc42

File tree

4 files changed

+22
-23
lines changed

4 files changed

+22
-23
lines changed

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub struct FullChat {
4545
archived: bool,
4646
pinned: bool,
4747
// subtitle - will be moved to frontend because it uses translation functions
48-
chat_type: JSONRPCChatType,
48+
chat_type: JsonrpcChatType,
4949
is_unpromoted: bool,
5050
is_self_talk: bool,
5151
contacts: Vec<ContactObject>,
@@ -191,7 +191,7 @@ pub struct BasicChat {
191191
profile_image: Option<String>, //BLOBS ?
192192
archived: bool,
193193
pinned: bool,
194-
chat_type: JSONRPCChatType,
194+
chat_type: JsonrpcChatType,
195195
is_unpromoted: bool,
196196
is_self_talk: bool,
197197
color: String,
@@ -276,34 +276,34 @@ impl JsonrpcChatVisibility {
276276

277277
#[derive(Clone, Serialize, Deserialize, PartialEq, TypeDef, schemars::JsonSchema)]
278278
#[serde(rename = "ChatType")]
279-
pub enum JSONRPCChatType {
279+
pub enum JsonrpcChatType {
280280
Single,
281281
Group,
282282
Mailinglist,
283283
OutBroadcast,
284284
InBroadcast,
285285
}
286286

287-
impl From<Chattype> for JSONRPCChatType {
287+
impl From<Chattype> for JsonrpcChatType {
288288
fn from(chattype: Chattype) -> Self {
289289
match chattype {
290-
Chattype::Single => JSONRPCChatType::Single,
291-
Chattype::Group => JSONRPCChatType::Group,
292-
Chattype::Mailinglist => JSONRPCChatType::Mailinglist,
293-
Chattype::OutBroadcast => JSONRPCChatType::OutBroadcast,
294-
Chattype::InBroadcast => JSONRPCChatType::InBroadcast,
290+
Chattype::Single => JsonrpcChatType::Single,
291+
Chattype::Group => JsonrpcChatType::Group,
292+
Chattype::Mailinglist => JsonrpcChatType::Mailinglist,
293+
Chattype::OutBroadcast => JsonrpcChatType::OutBroadcast,
294+
Chattype::InBroadcast => JsonrpcChatType::InBroadcast,
295295
}
296296
}
297297
}
298298

299-
impl From<JSONRPCChatType> for Chattype {
300-
fn from(chattype: JSONRPCChatType) -> Self {
299+
impl From<JsonrpcChatType> for Chattype {
300+
fn from(chattype: JsonrpcChatType) -> Self {
301301
match chattype {
302-
JSONRPCChatType::Single => Chattype::Single,
303-
JSONRPCChatType::Group => Chattype::Group,
304-
JSONRPCChatType::Mailinglist => Chattype::Mailinglist,
305-
JSONRPCChatType::OutBroadcast => Chattype::OutBroadcast,
306-
JSONRPCChatType::InBroadcast => Chattype::InBroadcast,
302+
JsonrpcChatType::Single => Chattype::Single,
303+
JsonrpcChatType::Group => Chattype::Group,
304+
JsonrpcChatType::Mailinglist => Chattype::Mailinglist,
305+
JsonrpcChatType::OutBroadcast => Chattype::OutBroadcast,
306+
JsonrpcChatType::InBroadcast => Chattype::InBroadcast,
307307
}
308308
}
309309
}

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 & 3 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,8 +532,7 @@ pub struct MessageSearchResult {
532532
chat_profile_image: Option<String>,
533533
chat_color: String,
534534
chat_name: String,
535-
chat_type: u32,
536-
chat_type: JSONRPCChatType,
535+
chat_type: JsonrpcChatType,
537536
is_chat_contact_request: bool,
538537
is_chat_archived: bool,
539538
message: String,

0 commit comments

Comments
 (0)