Skip to content

Conversation

@Palbahngmiyine
Copy link
Member

  • Updated the message service to include faxOptions and voiceOptions fields.
  • Added tests for sending fax and voice messages, verifying the correct structure and response.

- Updated the message service to include `faxOptions` and `voiceOptions` fields.
- Added tests for sending fax and voice messages, verifying the correct structure and response.
@Palbahngmiyine Palbahngmiyine self-assigned this Jan 15, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @Palbahngmiyine, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the Solapi.Message.Service by integrating new functionalities for sending fax and voice messages. It introduces dedicated options for these message types, allowing for more versatile communication. The changes are accompanied by comprehensive tests to ensure the reliability and proper implementation of these new features.

Highlights

  • Feature Expansion: Added support for faxOptions in the Solapi.Message.Service to allow sending fax messages.
  • Feature Expansion: Added support for voiceOptions in the Solapi.Message.Service to allow sending voice messages.
  • Testing: Included new test cases to validate the correct handling and structure of messages with faxOptions.
  • Testing: Included new test cases to validate the correct handling and structure of messages with voiceOptions.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Palbahngmiyine Palbahngmiyine changed the title Add support for fax and voice message options in Solapi.Message.Service SOLAPI Elixir SDK 0.2.0 Jan 15, 2026
@Palbahngmiyine Palbahngmiyine changed the title SOLAPI Elixir SDK 0.2.0 SOLAPI Elixir SDK 0.1.1 Jan 15, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이 PR은 Solapi.Message.ServicefaxOptionsvoiceOptions를 추가하여 팩스 및 음성 메시지 발송 기능을 지원하는 변경 사항을 담고 있습니다. 전반적으로 기능 추가와 관련 테스트 코드는 잘 작성되었습니다.

다만, Elixir 코드의 일관성과 가독성을 높이기 위해 몇 가지 개선점을 제안합니다. 새로 추가된 옵션(faxOptions, voiceOptions)의 내부 키로 카멜 케이스(camelCase) 원자(atom)를 사용하고 있는데, Elixir 커뮤니티의 표준 컨벤션은 스네이크 케이스(snake_case)를 사용하는 것입니다.

따라서 테스트 코드에서는 :file_ids, :voice_type과 같이 스네이크 케이스를 사용하고, Service 모듈에서 API 요청을 생성할 때 이 키들을 카멜 케이스 문자열로 변환하는 로직을 추가하는 방향으로 리팩토링하는 것을 권장합니다. 자세한 내용은 각 파일의 리뷰 코멘트를 참고해 주세요.

Comment on lines +92 to +93
|> maybe_add("faxOptions", get_field(message, :fax_options, "faxOptions"))
|> maybe_add("voiceOptions", get_field(message, :voice_options, "voiceOptions"))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

테스트 코드에서 제안된 스네이크 케이스 원자 키(:file_ids, :voice_type)를 API가 요구하는 카멜 케이스 문자열 키(fileIds, voiceType)로 변환하기 위해, 옵션 맵의 키를 변환하는 로직을 추가해야 합니다. 이렇게 하면 Elixir 코드베이스에서는 일관된 스네이크 케이스를 유지하면서 외부 API와의 연동을 원활하게 할 수 있습니다.

아래와 같이 키를 변환하는 함수를 호출하도록 변경하고, 해당 함수를 모듈 내에 비공개 함수로 추가하는 것을 제안합니다.

추가할 헬퍼 함수 예시:

defp transform_option_keys(nil), do: nil
defp transform_option_keys(map) when is_map(map) do
  for {key, val} <- map, into: %{} do
    {key |> Atom.to_string() |> to_camel_case(), val}
  end
end

defp to_camel_case(string) do
  [first | rest] = String.split(string, "_")
  first <> Enum.map_join(rest, "", &String.capitalize/1)
end

transform_option_keys/1 함수는 kakaoOptions, rcsOptions 등 다른 옵션에도 일관되게 적용하여 라이브러리 전반의 일관성을 높일 수 있습니다.

    |> maybe_add("faxOptions", get_field(message, :fax_options, "faxOptions") |> transform_option_keys())
    |> maybe_add("voiceOptions", get_field(message, :voice_options, "voiceOptions") |> transform_option_keys())

Service.send(client, %{
to: "0212345678",
from: "0312345678",
fax_options: %{fileIds: ["file_id_123", "file_id_456"]}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Elixir에서는 원자(atom) 키에 대해 스네이크 케이스(snake_case)를 사용하는 것이 일반적인 컨벤션입니다. :fileIds 대신 :file_ids를 사용하도록 변경하는 것이 좋겠습니다. 이 변경에 맞춰 Solapi.Message.Service.normalize_message/1 함수에서 중첩된 맵의 키를 카멜 케이스(camelCase)로 변환하는 로직 추가가 필요합니다. 이는 라이브러리 전체의 일관성을 높이고 Elixir 개발자에게 더 친숙한 인터페이스를 제공할 것입니다.

          fax_options: %{file_ids: ["file_id_123", "file_id_456"]}

to: "01012345678",
from: "0212345678",
text: "음성 메시지 테스트입니다.",
voice_options: %{voiceType: "FEMALE"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Elixir의 컨벤션에 따라 원자(atom) 키는 스네이크 케이스(snake_case)로 작성하는 것이 좋습니다. :voiceType:voice_type으로 변경하는 것을 제안합니다. 이와 함께 Solapi.Message.Service 모듈에서 API 요청을 보내기 전에 이 키를 voiceType과 같은 카멜 케이스(camelCase) 문자열로 변환하는 로직이 필요합니다. 이는 FAX 옵션과 마찬가지로 코드의 일관성과 가독성을 향상시킵니다.

          voice_options: %{voice_type: "FEMALE"}

@Palbahngmiyine Palbahngmiyine merged commit 4d58198 into main Jan 15, 2026
2 checks passed
@Palbahngmiyine Palbahngmiyine deleted the impr/add-fax-and-voice-messages branch January 15, 2026 13:59
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

Successfully merging this pull request may close these issues.

2 participants