Skip to content

feat(iam/proto): add real-time ChatService, PresenceService, and attachments - #50

Merged
ilramdhan merged 2 commits into
mutugading:mainfrom
ilramdhan:fix/master-batch-costing
Jul 16, 2026
Merged

feat(iam/proto): add real-time ChatService, PresenceService, and attachments#50
ilramdhan merged 2 commits into
mutugading:mainfrom
ilramdhan:fix/master-batch-costing

Conversation

@ilramdhan

Copy link
Copy Markdown
Member

Description

PR ini menambahkan fungsionalitas sistem obrolan waktu nyata (real-time chat system) ke dalam modul IAM melalui file chat.proto. Pembaruan ini memperkenalkan ChatService dan PresenceService yang komprehensif, mendukung obrolan pribadi/grup, server-streaming chat events, cursor pagination, indikator status dan pengetikan, fitur lampiran file/gambar, hingga kemampuan untuk menghapus riwayat obrolan.

Change Type

  • ✨ New service/message
  • ➕ Add field/RPC/enum value
  • 🔄 Modify validation
  • 📝 Documentation update
  • ⚠️ Deprecation
  • 🔧 Config/script changes

Proto Files Changed

  • common/v1/common.proto
  • finance/v1/uom.proto
  • Other: iam/v1/chat.proto (Silakan sesuaikan dengan direktori aslinya)

Changes Made

  • Menambahkan file kontrak baru chat.proto.
  • Membuat ChatService dengan total 18 RPCs yang mencakup operasi direct/group conversations, pengiriman pesan dengan cursor pagination, read receipts, typing indicators, dan server-streaming chat events.
  • Membuat PresenceService dengan 2 RPCs untuk melacak online presence (status online) pengguna.
  • Menambahkan RPC ClearConversationHistory (mendukung DELETE .../conversations/{id}/history) untuk fitur penghapusan riwayat obrolan per pengguna.
  • Menambahkan RPC UploadChatAttachment (mendukung POST .../conversations/{id}/attachments) untuk mengunggah file.
  • Menambahkan message pendukung lampiran: AttachmentProto, field attachments pada MessageProto, dan field attachment_ids pada SendMessageRequest.

Related Issues

Fixes #
Related to #

Breaking Change Check

Is this a breaking change?

  • No - buf breaking passes
  • Yes - Requires version bump

Breaking Change Evidence

# Output of buf breaking command
buf breaking --against '.git#branch=main'

Lint Check

# Output of buf lint
buf lint

Generated Code Preview (Optional)

// Generated Go code changes

Pre-merge Checklist

  • I have read and followed RULES.md
  • buf format -w applied
  • buf lint passes
  • buf breaking passes
  • Comments document new messages/fields
  • REST mappings follow conventions
  • Validation rules are complete
  • Field numbers are logical

Impact Assessment

  • Backend code regeneration required
  • Frontend code regeneration required
  • OpenAPI spec regeneration required

Reviewer Notes

  • New Feature: PR ini menginisiasi keseluruhan kontrak untuk fitur real-time chat. Pastikan backend sudah siap menangani koneksi server-streaming untuk menangkap chat events.
  • Attachments: Terdapat integrasi upload attachment yang menggunakan HTTP POST. Front-end harus menangani proses upload file terlebih dahulu melalui UploadChatAttachment sebelum mengirimkan attachment_ids melalui SendMessageRequest.

ilramdhan and others added 2 commits July 16, 2026 05:02
Real-time chat system proto contracts: direct/group conversations,
messaging with cursor pagination, read receipts, typing indicators,
online presence, and server-streaming chat events.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extend ChatService for the three remaining chat features:

- ClearConversationHistory RPC (DELETE .../conversations/{id}/history)
  for per-user history clearing.
- UploadChatAttachment RPC (POST .../conversations/{id}/attachments)
  plus AttachmentProto, MessageProto.attachments, and
  SendMessageRequest.attachment_ids for file/image attachments.

Authored-By: Ilham R <ilhamram332@gmail.com>
Co-Authored-By: Ilham R <me@ilramdhan.dev>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: IT Mutugading <it@mutugading.com>
Co-Authored-By: Indra Putro <indraputro@mutugading.com>
Co-Authored-By: Ilham R <ilham.ramadhan@mutugading.com>
Co-Authored-By: IT Mutu Gading <mutugadingapps@gmail.com>
@ilramdhan ilramdhan added this to the Costing Release Milestone milestone Jul 16, 2026
@ilramdhan ilramdhan self-assigned this Jul 16, 2026
Copilot AI review requested due to automatic review settings July 16, 2026 17:20
@ilramdhan ilramdhan added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request feat fix labels Jul 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ilramdhan
ilramdhan merged commit 4db3efb into mutugading:main Jul 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request feat fix

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants