Skip to content

refactor: un-nest handle_edit_delete#8245

Open
WofWca wants to merge 1 commit into
mainfrom
wofwca/refactor-reduce-netsting-edit-delete
Open

refactor: un-nest handle_edit_delete#8245
WofWca wants to merge 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.

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.

2 participants