-
-
Notifications
You must be signed in to change notification settings - Fork 120
api: rename properties to be more consistent #7756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,9 @@ pub enum ChatListItemFetchResult { | |
| ChatListItem { | ||
| id: u32, | ||
| name: String, | ||
| /// deprecated 2026-01, use profile_image instead | ||
| avatar_path: Option<String>, | ||
| profile_image: Option<String>, | ||
iequidoo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| color: String, | ||
| chat_type: JsonrpcChatType, | ||
| last_updated: Option<i64>, | ||
|
|
@@ -61,9 +63,15 @@ pub enum ChatListItemFetchResult { | |
| is_self_talk: bool, | ||
| is_device_talk: bool, | ||
| is_sending_location: bool, | ||
| /// deprecated 2026-01, use self_in_group instead | ||
| is_self_in_group: bool, | ||
| self_in_group: bool, | ||
| /// deprecated 2026-01, use archived instead | ||
| is_archived: bool, | ||
| archived: bool, | ||
| /// deprecated 2026-01, use pinned instead | ||
| is_pinned: bool, | ||
| pinned: bool, | ||
| is_muted: bool, | ||
| is_contact_request: bool, | ||
| /// contact id if this is a dm chat (for view profile entry in context menu) | ||
|
|
@@ -105,7 +113,7 @@ pub(crate) async fn get_chat_list_item_by_id( | |
|
|
||
| let visibility = chat.get_visibility(); | ||
|
|
||
| let avatar_path = chat | ||
| let profile_image = chat | ||
| .get_profile_image(ctx) | ||
| .await? | ||
| .map(|path| path.to_str().unwrap_or("invalid/path").to_owned()); | ||
|
|
@@ -150,7 +158,8 @@ pub(crate) async fn get_chat_list_item_by_id( | |
| Ok(ChatListItemFetchResult::ChatListItem { | ||
| id: chat_id.to_u32(), | ||
| name: chat.get_name().to_owned(), | ||
| avatar_path, | ||
| profile_image: profile_image.clone(), | ||
| avatar_path: profile_image.clone(), | ||
| color, | ||
| chat_type: chat.get_type().into(), | ||
| last_updated, | ||
|
|
@@ -164,8 +173,11 @@ pub(crate) async fn get_chat_list_item_by_id( | |
| is_self_talk: chat.is_self_talk(), | ||
| is_device_talk: chat.is_device_talk(), | ||
| is_self_in_group: chat.is_self_in_chat(ctx).await?, | ||
| self_in_group: chat.is_self_in_chat(ctx).await?, | ||
|
||
| is_sending_location: chat.is_sending_locations(), | ||
| archived: visibility == ChatVisibility::Archived, | ||
| is_archived: visibility == ChatVisibility::Archived, | ||
| pinned: visibility == ChatVisibility::Pinned, | ||
| is_pinned: visibility == ChatVisibility::Pinned, | ||
| is_muted: chat.is_muted(), | ||
| is_contact_request: chat.is_contact_request(), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is wrong, then (apparently cargo doctest doesn't run in CI for deltachat-jsonrpc? Otherwise, it would have caught that).
Can just revert to the previous comment