Repository navigation
fix: bridge legacy LINE multi-person rooms via getRoomsV2 - #264
Conversation
|
1 potential issue found:
↑ Select any checkbox above to have Indent auto-fix the issue
All CI checks passed on
Select any unchecked box below to run or rerun that agent. Found issues (1)Full resultsIndent Review Agent
|
| if len(res.Chats) == 0 { | ||
| return nil, fmt.Errorf("chat not found") | ||
| var chat *line.Chat | ||
| if strings.HasPrefix(lowerMid, "r") { |
There was a problem hiding this comment.
🟡 Bug · All "r" portals skip getChats, losing name/avatar/invitees/creator on resync
Every portal ID starting with "r" now goes to getRoomsV2, and the synthesized Chat has only ChatMid, Type 1 and MemberMids. syncChatsNow still gets type-1 ROOM chats from getChats, so for any "r" chat getChats returns, a GetChatInfo resync produces a different ChatInfo than startup sync: empty ChatName replaces a custom name, empty PicturePath clears the avatar, nil InviteeMids removes invitees (Members.IsFull=true), and empty CreatorMid drops the creator's power level from 100 to 0. The two paths then overwrite each other.
Keep getChats as the first lookup for "r" mids and use getRoomsV2 only when getChats returns no chats (or errors).
Found by Indent Review Agent
No description provided.