Skip to content

[WTEL-9474]refactor(ws/member): fetch draft argument from WS input and - #483

Open
suifri wants to merge 1 commit into
mainfrom
refactor/WTEL-9474-pass-draft-parameter-to-cc
Open

[WTEL-9474]refactor(ws/member): fetch draft argument from WS input and#483
suifri wants to merge 1 commit into
mainfrom
refactor/WTEL-9474-pass-draft-parameter-to-cc

Conversation

@suifri

@suifri suifri commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

pass to cc

@webitel-review

webitel-review Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🤖 Webitel Code Review

Цей коміт додає підтримку прапорця draft (чернетка) при звітуванні про спробу дзвінка (ReportingAttempt). Зміни зачіпають gRPC API, WebSocket API, контролери та внутрішню логіку додатка, а також оновлюють згенеровані файли protobuf. Проте, у WebSocket-обробнику виявлено потенційну помилку компіляції або несумісність типів через використання неіснуючого методу.

📋 Walkthrough (5 файл(и/ів))
Файл Зміни
app/cc_member.go Додано параметр draft до методу ReportingAttempt та передачу його в структуру запиту AttemptResultRequest.
controller/member.go Оновлено сигнатуру методу ReportingAttempt контролера для підтримки параметра draft.
gen/cc/cc_member.pb.go Оновлено згенерований protobuf-файл: додано поле Draft до AttemptResultRequest.
grpc_api/cc_member.go Оновлено виклики ReportingAttempt у gRPC API (передається значення за замовчуванням false).
wsapi/member.go Оновлено WebSocket-обробник reporting для зчитування параметра draft із запиту та переведено повертаний тип на map[string]any.

Знахідки

  • [high] wsapi/member.go:187 — У файлі wsapi/member.go на рядку 187 використовується req.Get("draft"), тоді як усі інші параметри запиту отримуються через req.Data["..."]. Якщо структура model.WebSocketRequest не має методу Get, це призведе до помилки компіляції. Навіть якщо такий метод існує, для узгодженості коду слід використовувати req.Data["draft"].
🔗 Cross-repo callers змінених символів (6)
  • ReportingAttemptcall_center/grpc_api/member.go:50
  • ReportingAttemptcall_center/queue/queue_manager.go:108
  • ReportingAttemptcall_center/queue/team.go:239
  • ReportingAttemptengine/controller/member.go:36
  • ReportingAttemptengine/grpc_api/cc_member.go:1228
  • ReportingAttemptengine/wsapi/member.go:146

Index-grounded review across the Webitel codebase. Знахідки можуть бути неточними — перевіряйте перед застосуванням.

@webitel-review webitel-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Webitel Code Review — пропозиції змін

Comment thread wsapi/member.go

err := api.ctrl.ReportingAttempt(conn.GetSession(), int64(attemptId), status, description, nextDistributeAt, expire,
nil, display, int32(agentId), exclDes, waitBetweenRetries, onlyComm)
draft, _ := req.Get("draft").(bool)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Використовуйте req.Data замість req.Get для отримання значення draft, щоб уникнути помилки компіляції та зберегти узгодженість з іншими параметрами.

Suggested change
draft, _ := req.Get("draft").(bool)
draft, _ := req.Data["draft"].(bool)

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.

1 participant