-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
fix forwarding messages from encrypted to unencrypted chat without creating a new message object #5125
Conversation
4f8b801
to
d4a9e93
Compare
IDK how, but it works in my Desktop. I can forward encrypted messages to unencrypted chats so that they are sent as unencrypted. Version 1.42.2 (git: v1.33.0-555-g9da03dd2). EDIT: Also it works on Android. And even forwarding from verified 1:1-s. |
Yes, they are creating a new message object I think. That it does not work like this in the python bindings is a footgun, and it also breaks the teams-bot use case. |
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.
I think the bug itself should be fixed in this PR also, then we can merge it. I can try on my own
d4a9e93
to
57dff58
Compare
…ent API Currently `Chat.send_msg()` modifies the source message and returns another message object equivalent to the source one. That's how it works in the core and thus in Python bindings too.
…nt message This allows to send existing messages (incoming and outgoing) taken from encrypted chats, to unencrypted ones. `Param::ForcePlaintext` is removed as well -- if a message can be sent encrypted this time, nothing bad with this.
57dff58
to
e2e8a8d
Compare
Nice, it fixes the bug in teams-bot as well! I added two assert statements to the test fixture, which serve to document which messages get awaited. Can be merged :) and I'd also be happy about a core release so I can fix the teams-bots out there. |
I'd suggest to wait a bit for @link2xt to check the core change as the issue creator |
CI passes :) so should it be simply rebased, or also squashed? |
Whatever you prefer, but in this case better not squash as it has nice commit messages that end up in the changelog. |
fixes #5123
the test passes actually, I think it's not the same problem the teams-bot has.seems the test fails for the right reasons now :)