fix: make create_send_msg_jobs actually return row IDs - #8585
Open
link2xt wants to merge 2 commits into
Open
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
link2xt
force-pushed
the
link2xt/create_send_msg_jobs-row_id
branch
from
August 14, 2026 11:40
20ae3c5 to
889578d
Compare
link2xt
force-pushed
the
link2xt/create_send_msg_jobs-row_id
branch
2 times, most recently
from
August 23, 2026 02:37
42ebbff to
1ca89ff
Compare
.execute() was returning the number of rows, so usually 1. .insert() is returning the row ID. In most cases it does not matter because the result is checked with .is_empty(), but send_msg_sync() actually uses the row IDs.
link2xt
force-pushed
the
link2xt/create_send_msg_jobs-row_id
branch
from
August 25, 2026 14:08
1ca89ff to
e657a72
Compare
link2xt
marked this pull request as ready for review
August 25, 2026 14:08
link2xt
commented
Aug 25, 2026
| chat1.send_msg_sync(msg1) | ||
|
|
||
| lp.sec("ac2: receive message") | ||
| msg_in = ac2._evtracker.wait_next_incoming_message() |
Collaborator
Author
There was a problem hiding this comment.
The test gets stuck without the fix, likely here because the message is never sent out as it tries to send rowid 1 from smtp table.
Collaborator
Author
|
Ended up writing a python test for dc_send_msg_sync() because it is the only API that is affected and only exists as CFFI. IIRC it is used by iOS for share extension. |
link2xt
commented
Aug 25, 2026
| sent_id = lib.dc_send_msg_sync(self.account._dc_context, self.id, msg._dc_msg) | ||
| if sent_id == 0: | ||
| raise ValueError("message could not be sent") | ||
| # modify message in place to avoid bad state for the caller |
Collaborator
Author
There was a problem hiding this comment.
This code is copy-pasted from a function above.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
.execute() was returning the number of rows, so usually 1.
.insert() is returning the row ID.
In most cases it does not matter because the result is checked with .is_empty(), but send_msg_sync() actually uses the row IDs.