Skip to content

There is missing status in ConversationMessageStatus enum class #198

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

Closed
ssk910 opened this issue May 3, 2022 · 2 comments
Closed

There is missing status in ConversationMessageStatus enum class #198

ssk910 opened this issue May 3, 2022 · 2 comments

Comments

@ssk910
Copy link
Contributor

ssk910 commented May 3, 2022

Hello!

There is a missing status in ConversationMessageStatus enum class unlike your REST API.

When I call your API as https://conversations.messagebird.com/v1/messages/dc841a129e4144a68809a4300342dd13.
It gives me a response as below:

{
    "id": "dc841a129e4144a68809a4300342dd13",
    "conversationId": "4260b4987d0e4c71a8fbdfd47d91d1d1",
    "platform": "whatsapp",
    "to": "+82244433333",
    "from": "MY_NUMBER_:)",
    "channelId": "MY_CHANNEL_ID_:)",
    "type": "hsm",
    "content": {
        "hsm": {
            "namespace": "MY_NAMESPACE_:)",
            "templateName": "0426_payment_kr",
            "language": {
                "policy": "deterministic",
                "code": "ko"
            }
        }
    },
    "direction": "sent",
    "status": "rejected",
    "error": {
        "code": 302,
        "description": "The contact is not registered on WhatsApp."
    },
    "createdDatetime": "2022-04-28T05:00:41.721223626Z",
    "updatedDatetime": "2022-04-28T05:00:42Z",
    "origin": "api"
}

But, unlike your API, when I call viewConversationMessage() method in MessageBirdClient class, it gives me as below:

I'm using your Java SDK with my wrapper class that customizes ConversationMessage.
So, please ignore snake cases and some fields.

{
    "id": "dc841a129e4144a68809a4300342dd13",
    "conversation_id": "4260b4987d0e4c71a8fbdfd47d91d1d1",
    "channel_id": "MY_CHANNEL_ID_:)",
    "direction": "sent",
    "status": null,
    "type": "hsm",
    "content": {
        "audio": null,
        "file": null,
        "hsm": {
            "namespace": "MY_NAMESPACE_:)",
            "template_name": "0426_payment_kr",
            "language": {
                "code": "ko",
                "policy": "deterministic"
            },
            "params": null,
            "components": null
        },
        "image": null,
        "location": null,
        "email": null,
        "text": null,
        "video": null
    },
    "created_datetime": "2022-04-28T05:00:41.721+00:00",
    "updated_datetime": "2022-04-28T05:00:42.000+00:00",
    "source": null,
    "tag": null,
    "platform": "whatsapp"
}

As you can see above, it gives me a status as null.
Because there is no member for rejected status in ConversationMessageStatus enum class.
Maybe there can be more missing status.

Thank you.

@olimpias
Copy link
Contributor

olimpias commented May 3, 2022

Hi @ssk910, thanks for reporting it. I will take a look and fix the issue. Also gonna check, if we are missing other statuses

@denizkilic
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants