Skip to content

Feature: Rich Media for Slack Client - #10

Merged
shahidfoy merged 37 commits into
n1netails:mainfrom
ArturSlimak:feature/rich-media-support
Mar 1, 2026
Merged

Feature: Rich Media for Slack Client#10
shahidfoy merged 37 commits into
n1netails:mainfrom
ArturSlimak:feature/rich-media-support

Conversation

@ArturSlimak

Copy link
Copy Markdown
Contributor

🚀 Pull Request

📌 Summary

This PR introduces a structured Slack messaging system that enables sending rich, block-based messages.

🧪 What Does This Fix or Improve?

  • Bug fix
  • New feature
  • Performance improvement
  • Documentation update
  • Other (describe below)

🔍 Changes

  • Added block-based messaging system (SlackBlock, SlackElement) with support for:

    • TextBlock, ImageBlock, GifBlock
    • ActionsBlock (for grouping interactive elements)
  • Introduced button elements via ButtonElement:

    • Supports both url (link buttons) and actionId (future interaction hooks)
  • Implemented builder pattern across the API:

    • SlackMessage.builder()
    • Builders for all blocks and elements
    • Enforced validation rules (no mixing raw/custom blocks, required fields, etc.)
  • Added validation framework:

    • SlackValidator<T> interface
    • Validators for all blocks and elements
    • BasicSlackValidators registry
    • SlackBlockValidator with recursive (composite) validation
  • Improved error handling:

    • Introduced SlackErrorMapper for errors returned by Slack API
    • Parses Slack API errors into readable, structured messages
  • Enhanced BotService:

    • Integrated validation layer
    • Added block building (SlackBlockBuilder)
    • Centralized message sending and error handling
  • Support for raw Slack Block Kit (LayoutBlock) usage is hardly changed:

    • Allows advanced/custom Slack blocks
    • Prevents mixing with custom block abstractions
  • Refactored and documented codebase with consistent Javadoc:

    • Clear API usage
    • Examples and validation rules included
  • Updated README with:

    • Improved usage examples
    • Builder-based approach
    • Rich media

🧪 Testing Steps

TODO. I will open an issue to get some help or cover it after Interactive event handling implementation

📸 Screenshots (if applicable)

Attach images or logs here.

🔗 Related Issues

Partially #9

@shahidfoy

Copy link
Copy Markdown
Member

@ArturSlimak this is looking good so far I plan to try it out on one of my slack channels

would you be able to update the readme.md at the bottom with this info

## N1netails Slack Client Contributors

Thanks to all the amazing people who contributed to N1netails Slack Client! 💙

[![Contributors](https://contrib.rocks/image?repo=n1netails/n1netails-slack-client)](https://github.com/n1netails/n1netails-slack-client/graphs/contributors)

Comment thread readme.md Outdated
Comment thread readme.md Outdated
Comment thread readme.md

@shahidfoy shahidfoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@ArturSlimak make sure the build is passing when running mvn clean install -P release

@shahidfoy
shahidfoy merged commit 37a97c2 into n1netails:main Mar 1, 2026
2 checks passed
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