Skip to content

refactor: un-nest handle_edit_delete#8245

Merged
WofWca merged 1 commit into
mainfrom
wofwca/refactor-reduce-netsting-edit-delete
May 20, 2026
Merged

refactor: un-nest handle_edit_delete#8245
WofWca merged 1 commit into
mainfrom
wofwca/refactor-reduce-netsting-edit-delete

Conversation

@WofWca
Copy link
Copy Markdown
Collaborator

@WofWca WofWca commented May 15, 2026

Back before e10f95b
(#6664) this code was inlined
into add_parts() so it couldn't utilize early returns.
Now it can.

I only decided not to touch the edit_msg_showpadlock part,
because I don't understand the intended meaning of the condition
(this might be a bug).

Related:

@link2xt
Copy link
Copy Markdown
Collaborator

link2xt commented May 16, 2026

I only decided not to touch the edit_msg_showpadlock part, because I don't understand the intended meaning of the condition

edit_msg_showpadlock || !original_msg.get_showpadlock() means that if edit message is not encrypted and original message is encrypted, edit should not be applied. So it is not possible to edit "secure" message with "insecure" message.

Back before e10f95b
(#6664) this code was inlined
into `add_parts()` so it couldn't utilize early returns.
Now it can.
@WofWca WofWca force-pushed the wofwca/refactor-reduce-netsting-edit-delete branch from e1fbdd0 to 855153c Compare May 16, 2026 06:34
@WofWca
Copy link
Copy Markdown
Collaborator Author

WofWca commented May 16, 2026

Thanks! Makes sense.
I adjusted that part now as well.

Copy link
Copy Markdown
Collaborator

@Hocuri Hocuri left a comment

Choose a reason for hiding this comment

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

Go ahead and merge :)

@WofWca WofWca merged commit a6a733c into main May 20, 2026
31 checks passed
@WofWca WofWca deleted the wofwca/refactor-reduce-netsting-edit-delete branch May 20, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants