View Source Glific.Communications.Message (Glific v5.1.6)

The Message Communication Context, which encapsulates and manages tags and the related join tables.

Link to this section Summary

Functions

Callback in case of any error while sending the message

Callback when message send successfully.

Callback when we receive a message from whats app

Send message to receiver using define provider.

Callback to update the provider status for a message

Link to this section Functions

Link to this function

handle_error_response(response, message)

View Source
@spec handle_error_response(Tesla.Env.t() | map(), Glific.Messages.Message.t()) ::
  {:error, String.t()}

Callback in case of any error while sending the message

Link to this function

handle_success_response(response, message)

View Source
@spec handle_success_response(Tesla.Env.t(), Glific.Messages.Message.t()) ::
  {:ok, Glific.Messages.Message.t()}

Callback when message send successfully.

Link to this function

receive_message(message_params, type \\ :text)

View Source
@spec receive_message(map(), atom()) :: :ok | {:error, String.t()}

Callback when we receive a message from whats app

Link to this function

send_message(message, attrs \\ %{})

View Source
@spec send_message(Glific.Messages.Message.t(), map()) ::
  {:ok, Glific.Messages.Message.t()} | {:error, String.t()}

Send message to receiver using define provider.

Link to this function

update_bsp_status(bsp_message_id, bsp_status, errors)

View Source
@spec update_bsp_status(String.t(), atom(), map()) :: any()

Callback to update the provider status for a message