Skip to content

Editing text in a Slack text+file message fails: "Multiple rows were not expected" #486

Open
@jaller94

Description

@jaller94

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Use PostgreSQL
  2. Go to Slack
  3. Post a message with a file.
  4. Change the text part of the message.

Expected behavior
The message edit will be bridged to Matrix.

Actual behavior
The message edit is not bridged to Matrix because of a bridge error when querying the database.

Screenshots

Sep-11 19:51:58.515 INFO bridge [-] PUT http://localhost:8008/_matrix/client/r0/rooms/!ZmWyDEBEKfOdXjldOC%3Asynapse-dev.local/send/m.room.message/m1599846718514.2 (@slack_matrix-bridge-dev_U010AAR88B1:synapse-dev.local) Body: "{\"body\":\"blub\",\"format\":\"org.matrix.custom.html\",\"formatted_body\":\"b
Sep-11 19:51:58.554 INFO bridge ::1 - - [11/Sep/2020:17:51:58 +0000] "PUT /transactions/475?access_token=<REDACTED> HTTP/1.1" 200 2 "-" "Synapse/1.15.1"

Sep-11 19:51:58.591 INFO bridge [-] PUT http://localhost:8008/_matrix/client/r0/rooms/!ZmWyDEBEKfOdXjldOC%3Asynapse-dev.local/send/m.room.message/m1599846718514.2 (@slack_matrix-bridge-dev_U010AAR88B1:synapse-dev.local) HTTP 200 "{\"event_id\": \"$5RZEYQrnln38cMM7F8sfmQDs1C0M7a4tu7BZ_PUOvkQ\"}"
Event sent to !ZmWyDEBEKfOdXjldOC:synapse-dev.local with event id $5RZEYQrnln38cMM7F8sfmQDs1C0M7a4tu7BZ_PUOvkQ
Sep-11 19:51:58.623 INFO bridge ::1 - - [11/Sep/2020:17:51:58 +0000] "PUT /transactions/476?access_token=<REDACTED> HTTP/1.1" 200 2 "-" "Synapse/1.15.1"

Sep-11 19:52:05.625 INFO SlackGhost Updating user information for U010AAR88B1
Sep-11 19:52:05.634 ERROR BridgedRoom Failed to process event
Sep-11 19:52:05.635 ERROR BridgedRoom QueryResultError {
    code: queryResultErrorCode.multiple
    message: "Multiple rows were not expected."
    received: 2
    query: "SELECT * FROM events WHERE slackChannel = 'C011698KQUC' AND slackTs = '1599846717.004700'"
}

Slack

Screenshot_2020-09-11_20-01-15

Matrix

Screenshot_2020-09-11_20-01-35
"blub" should have been changed to "make" as seen above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-DefectBugs, crashes, hangs, vulnerabilities, or other reported problems.Z-Good-First-IssueGood for newcomershacktoberfestGood issues for people to tackle as part of hacktoberfestsubstitutionsAn issue relating to translation of event content between Slack and Matrix.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions