Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Recoverable deleted messages are omitted when --conversation-filter is set #426

Closed
ReagentX opened this issue Jan 9, 2025 · 0 comments · Fixed by #427
Closed

Recoverable deleted messages are omitted when --conversation-filter is set #426

ReagentX opened this issue Jan 9, 2025 · 0 comments · Fixed by #427
Assignees
Labels
bug Something isn't working crate: database Related to the database crate table Related to table data

Comments

@ReagentX
Copy link
Owner

ReagentX commented Jan 9, 2025

This comes from #424.

The issue comes from here:

if let Some(chat_ids) = &context.selected_chat_ids {
if !filters.is_empty() {
filters.push_str(" AND ");
}
filters.push_str(&format!(
" c.chat_id IN ({})",
chat_ids
.iter()
.map(|x| x.to_string())
.collect::<Vec<String>>()
.join(", "),
));
}

The query filler only looks at the chat_id column, but for deleted messages that column is NULL as I mention here. The query needs to also take the deleted_from column in the query.

@ReagentX ReagentX added bug Something isn't working crate: database Related to the database crate table Related to table data labels Jan 9, 2025
@ReagentX ReagentX moved this to In Progress in 2.3: Whispering Bells Jan 9, 2025
@ReagentX ReagentX self-assigned this Jan 9, 2025
@ReagentX ReagentX changed the title Deleted messages are omitted when --conversation-filter is set Recoverable deleted messages are omitted when --conversation-filter is set Jan 9, 2025
ReagentX added a commit that referenced this issue Jan 9, 2025
@ReagentX ReagentX moved this from In Progress to Done in 2.3: Whispering Bells Jan 11, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working crate: database Related to the database crate table Related to table data
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant