Skip to content

Allow deleting moved messages #219

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Allow deleting moved messages #219

wants to merge 7 commits into from

Conversation

00-kat
Copy link
Collaborator

@00-kat 00-kat commented May 1, 2025

Closes half of section three of #155, and lays the groundwork for the second half.

It's not perfect, but I doubt the few edge cases would ever occur.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for deleting moved messages while refining the moved message processing workflow. Key changes include updates to message data handling (switching to a MessageData.scrape method and using files instead of attachments), the addition of test cases for snowflake extraction and moved message author detection, and the introduction of a context menu command for deleting moved messages.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_message_moving.py Adds comprehensive tests for snowflake extraction and moved message author logic.
app/utils/webhooks.py Updates moved message formatting, replaces attachment handling with files, and renames a parameter.
app/utils/message_data.py Switches to a MessageData subclass with asynchronous file scraping.
app/utils/init.py Updates imports to reflect changes in message data handling.
app/core.py Minor comment update for consistency.
app/components/zig_codeblocks.py Adjusts call to move_message_via_webhook with a flag to disable move markers.
app/components/move_message.py Introduces a context menu command to delete moved messages and updates permissions handling.
app/components/github_integration/mentions/resolution.py Updates comment capitalization for consistency.

@00-kat
Copy link
Collaborator Author

00-kat commented May 1, 2025

I'll deal with the CI failure tomorrow (I didn't catch it before because Ruff 0.9.10, which is what I use, handles it correctly, while Ruff 0.9.6, which is what the CI uses as it is what is in the lockfile, doesn't).

I would like a suggestion on what to do:

  • Bump Ruff.
  • Add a noqa.

@trag1c
Copy link
Member

trag1c commented May 1, 2025

Let's bump ruff to v0.11.78 :)

@00-kat 00-kat force-pushed the 0x7f branch 2 times, most recently from 12c005a to 858c6e2 Compare May 2, 2025 02:36
@00-kat 00-kat mentioned this pull request May 1, 2025
13 tasks
@00-kat 00-kat force-pushed the 0x7f branch 2 times, most recently from f46ba14 to 7a8789e Compare May 2, 2025 03:09
@00-kat 00-kat force-pushed the 0x7f branch 3 times, most recently from 5d27463 to f20a330 Compare May 2, 2025 03:25
@00-kat

This comment was marked as outdated.

@00-kat 00-kat force-pushed the 0x7f branch 2 times, most recently from ac73a22 to 878fa83 Compare May 2, 2025 10:51
@00-kat 00-kat marked this pull request as draft May 2, 2025 11:17
@00-kat 00-kat force-pushed the 0x7f branch 8 times, most recently from 14bb084 to 9a9b0a5 Compare May 4, 2025 11:56
@00-kat 00-kat mentioned this pull request May 4, 2025
@00-kat 00-kat force-pushed the 0x7f branch 2 times, most recently from 727fa5a to 44aa13b Compare May 5, 2025 06:38
@00-kat
Copy link
Collaborator Author

00-kat commented May 5, 2025

Note: there is currently a known issue, where moved moved messages cannot be deleted, but I don't want to fix it now since it's an exceptionally rare case and it requires parsing the subtext, which I started in another commit and am not in the mood to do the commit surgery to reorder into this one.

@00-kat 00-kat marked this pull request as ready for review May 5, 2025 12:55
@00-kat 00-kat force-pushed the 0x7f branch 9 times, most recently from c1bf257 to 4a51c7b Compare May 10, 2025 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants