Skip to content
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

Message status doesn't reflect sending status correctly #1826

Open
1 of 2 tasks
PhantomRay opened this issue May 23, 2024 · 0 comments
Open
1 of 2 tasks

Message status doesn't reflect sending status correctly #1826

PhantomRay opened this issue May 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@PhantomRay
Copy link
Contributor

PhantomRay commented May 23, 2024

Checklist

  • I could not find a solution in the documentation, the existing issues or discussions.
  • I already asked for help in the chat

In which Project did the bug appear?

Other

If you selected "Other" as Project, please enter in which project the bug occurred.

No response

On which platform did the bug appear?

Android, iOS

SDK Version

0.29.x

Describe the problem caused by this bug

Before 0.29, after sending a message successfully, the statuses for events received are 0 and 1.
After 0.29, the first event has a status of -1, then the subsequent events have 0, then 1.

Before 0.29, after sending a message unsuccessfully (e.g. turn off network), the statuses for events received are 0 and -1.
After 0.29, the first event has a status of 0, then the subsequent event has -2.

According to the value, -2 means MessageStatus.removed, which doesn't make sense.

Steps To Reproduce

No response

Screenshots or Logs

Events after message successfully sent

{
    "type": "EventUpdateType.timeline",
    "roomId": "!crcyDnInTUsdakvAZX:myserver.com",
    "content": {
        "type": "m.room.message",
        "content": {
            "msgtype": "m.text",
            "body": "wer"
        },
        "sender": "@sz0vte84wzk:myserver.com",
        "event_id": "clientName-1-1716424404530",
        "origin_server_ts": 1716424404616,
        "unsigned": {
            "com.famedly.famedlysdk.message_sending_status": -1,
            "transaction_id": "clientName-1-1716424404530"
        },
        "status": -1
    }
}
{
    "type": "EventUpdateType.timeline",
    "roomId": "!crcyDnInTUsdakvAZX:myserver.com",
    "content": {
        "type": "m.room.message",
        "content": {
            "msgtype": "m.text",
            "body": "wer"
        },
        "sender": "@sz0vte84wzk:myserver.com",
        "event_id": "$Luk6_MRdCPmyeUobITjbGI7p_SeiXxuSC7ICXfixP_M",
        "origin_server_ts": 1716424404616,
        "unsigned": {
            "com.famedly.famedlysdk.message_sending_status": 0,
            "transaction_id": "clientName-1-1716424404530"
        },
        "status": 0
    }
}
{
    "type": "EventUpdateType.timeline",
    "roomId": "!crcyDnInTUsdakvAZX:myserver.com",
    "content": {
        "type": "m.room.message",
        "content": {
            "msgtype": "m.text",
            "body": "wer"
        },
        "sender": "@sz0vte84wzk:myserver.com",
        "event_id": "$Luk6_MRdCPmyeUobITjbGI7p_SeiXxuSC7ICXfixP_M",
        "origin_server_ts": 1716424405091,
        "unsigned": {
            "age": 136,
            "transaction_id": "clientName-1-1716424404530",
            "com.famedly.famedlysdk.message_sending_status": 1
        },
        "status": 1
    }
}

Events after message unsuccessfully sent

{
    "type": "EventUpdateType.timeline",
    "roomId": "!crcyDnInTUsdakvAZX:myserver.com",
    "content": {
        "type": "m.room.message",
        "content": {
            "msgtype": "m.text",
            "body": "feef"
        },
        "sender": "@sz0vte84wzk:myserver.com",
        "event_id": "clientName-2-1716424525638",
        "origin_server_ts": 1716424525663,
        "unsigned": {
            "com.famedly.famedlysdk.message_sending_status": -1,
            "transaction_id": "clientName-2-1716424525638"
        },
        "status": -1
    }
}
{
        "type": "EventUpdateType.timeline",
        "roomId": "!crcyDnInTUsdakvAZX:myserver.com",
        "content": {
            "type": "m.room.message",
            "content": {
                "msgtype": "m.text",
                "body": "feef"
            },
            "sender": "@sz0vte84wzk:myserver.com",
            "event_id": "clientName-2-1716424525638",
            "origin_server_ts": 1716424525663,
            "unsigned": {
                "com.famedly.famedlysdk.message_sending_status": -2,
                "transaction_id": "clientName-2-1716424525638"
            },
            "status": -2
        }
}

Security related

No response

@PhantomRay PhantomRay added the bug Something isn't working label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant