Commit 95de687
fix(job): guard group conversation in MixinJob.createConversation (#6416)
* fix(job): skip auto-create for group conversation in checkConversationExist
The createConversation path in MixinJob builds a minimal ConversationRequest
without random_id, name, announcement, or full participants. When a GROUP
conversation falls into SendMessageJob's checkConversationExist with a
non-SUCCESS status, it triggers /conversations create with category=GROUP
but no random_id, which the server rejects (missing or invalid UUID).
Short-circuit groups here so creation stays on the proper flow via
GroupViewModel / ConversationListViewModel.createGroupConversation, which
always supplies a valid randomId.
* fix(job): guard against group conversation in createConversation
createConversation builds a minimal ConversationRequest without random_id,
name, or full participants, which is only valid for CONTACT (1v1) where
the conversationId is deterministically derived from two userIds. If a
GROUP slips into this path (e.g. SendMessageJob.checkConversationExist on
a non-SUCCESS local group), the /conversations POST hits the server with
category=GROUP but no random_id, yielding 'invalid UUID' or missing-param
errors and a broken group on the server.
Bail out early for groups and report the unexpected state so the proper
GroupViewModel / ConversationListViewModel flow remains the only path
that creates groups.
---------
Co-authored-by: Crossle Song <crosslesong@gmail.com>1 parent 53c76fa commit 95de687
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
185 | 192 | | |
186 | 193 | | |
187 | 194 | | |
| |||
0 commit comments