* 更新会话的所有者
(id: string, ownerId: string | null)
| 673 | * 更新会话的所有者 |
| 674 | */ |
| 675 | async function updateSessionOwnerId(id: string, ownerId: string | null): Promise<boolean> { |
| 676 | try { |
| 677 | const success = await useDataService().updateSessionOwnerId(id, ownerId) |
| 678 | if (success) { |
| 679 | const session = sessions.value.find((s) => s.id === id) |
| 680 | if (session) { |
| 681 | session.ownerId = ownerId |
| 682 | } |
| 683 | } |
| 684 | return success |
| 685 | } catch (error) { |
| 686 | console.error('更新会话所有者失败:', error) |
| 687 | return false |
| 688 | } |
| 689 | } |
| 690 | |
| 691 | /** |
| 692 | * 手动选择"我是谁":写入当前会话 owner,更新平台 owner profile, |
nothing calls this directly
no test coverage detected