* 手动选择"我是谁":写入当前会话 owner,更新平台 owner profile, * 并批量应用到同平台其他未设置 owner 的会话
(id: string, ownerPlatformId: string)
| 693 | * 并批量应用到同平台其他未设置 owner 的会话 |
| 694 | */ |
| 695 | async function setOwnerAndApplyProfile(id: string, ownerPlatformId: string) { |
| 696 | const result = await useDataService().setOwnerAndApplyProfile(id, ownerPlatformId) |
| 697 | for (const sessionId of [id, ...result.updatedSessionIds]) { |
| 698 | const session = sessions.value.find((s) => s.id === sessionId) |
| 699 | if (session) { |
| 700 | session.ownerId = result.updatedSessionOwnerIds[sessionId] ?? result.ownerId |
| 701 | } |
| 702 | } |
| 703 | return result |
| 704 | } |
| 705 | |
| 706 | /** |
| 707 | * 尝试用已保存的平台 owner profile 自动补全会话 owner(唯一匹配才写入) |
nothing calls this directly
no test coverage detected