Skip to content

Enhance Message Publication Method for Custom Country and Operator #7

@PromiseFru

Description

@PromiseFru

Description:

We should enhance the message publication method to allow users to specify the country and operator in the request body.

Issue Type: Enhancement

Priority: Medium

Current Behavior:

The message publication method currently derives the country and operator information from the recipient's phone number when sending messages. This default behaviour may not provide enough flexibility for users who wish to specify a different country's gateway or operator when sending messages.

Desired Behavior:

We should enhance the message publication method to allow users to specify the country and operator in the request body. If these keys are present in the request, they should take priority over the current method of deriving the country and operator from the recipient's phone number. However, if these keys are not present, the method should continue to derive the country and operator from the phone number as it does currently.

Steps to Reproduce:

Currently, there is no way for users to specify a custom country and operator when using the message publication method. The method only derives this information from the recipient's phone number.

Proposed Changes:

  • Modify the message publication method to accept optional parameters for "country" and "operator" in the request body.
  • If "country" and "operator" are provided in the request, use these values to determine the message's routing and gateway.
  • If "country" and "operator" are not provided in the request, fall back to the current method of deriving this information from the recipient's phone number.
  • Ensure that the method documentation is updated to reflect these changes.

Additional Information:

Adding this feature will provide users with greater control and flexibility when sending messages using the message publication method. It allows them to specify the country and operator for a message, which can be useful in scenarios where customization is required. This enhancement can make the method more versatile and user-friendly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions