| 1559 | export function getConnectedPersonas(characterKey = undefined) { | 1559 | export function getConnectedPersonas(characterKey = undefined) { |
| 1560 | characterKey ??= selected_group || characters[Number(this_chid)]?.avatar; | 1560 | characterKey ??= selected_group || characters[Number(this_chid)]?.avatar; |
| 1561 | const connectedPersonas = Object.entries(power_user.persona_descriptions) | 1561 | const connectedPersonas = Object.entries(power_user.persona_descriptions) |
| 1562 | .filter(([_, desc]) => desc.connections?.some(conn => conn.type === 'character' && conn.id === characterKey)) | 1562 | .filter(([_, { connections }]) => connections?.some(conn => conn.id === characterKey)) |
| 1563 | .map(([key, _]) => key); | 1563 | .map(([key, _]) => key); |
| 1564 | return connectedPersonas; | 1564 | return connectedPersonas; |
| 1565 | } | 1565 | } |