Skip to content

Bug found in the new api code reported in chan - #1679

Merged
g1itch merged 1 commit into
Bitmessage:v0.6from
g1itch:api
Oct 5, 2020
Merged

Bug found in the new api code reported in chan#1679
g1itch merged 1 commit into
Bitmessage:v0.6from
g1itch:api

Conversation

@g1itch

@g1itch g1itch commented Oct 4, 2020

Copy link
Copy Markdown
Collaborator

Inconsistent query in HandleGetInboxMessageById():

The current head of the master branch has a broken API, specifically when calling getInboxMessageById() the following error is produced:

Unexpected API Failure - _dump_inbox_message() takes exactly 8 arguments (7 given)

This is the result of the SQL query returning 7 values instead of 8. It is missing the msgid as the first value. See the following line that is the issue:

"SELECT toaddress, fromaddress, subject, received, message,"

The following code:

    queryreturn = sqlQuery(
        "SELECT toaddress, fromaddress, subject, received, message,"
        " encodingtype, read FROM inbox WHERE msgid=?", msgid
    )

Should be changed to:

    queryreturn = sqlQuery(
        "SELECT msgid, toaddress, fromaddress, subject, received, message,"
        " encodingtype, read FROM inbox WHERE msgid=?", msgid
    )

@PeterSurda PeterSurda added the bug Something isn't working as it's supposed to label Oct 4, 2020
@PeterSurda PeterSurda added this to the v0.6.4 milestone Oct 4, 2020
@g1itch
g1itch merged commit 6b65113 into Bitmessage:v0.6 Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as it's supposed to

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants