Fix gallery for first in the list
| @@ -169,7 +169,7 @@ async function showCharGallery() { | ||
| 169 | 169 | |
| 170 | 170 | try { |
| 171 | 171 | let url = selected_group || this_chid; |
| 172 | 172 | if (!selected_group && this_chid !== undefined) { |
| 173 | 173 | const char = characters[this_chid]; |
| 174 | 174 | url = char.avatar.replace('.png', ''); |
| 175 | 175 | } |
| @@ -455,7 +455,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({ | ||
| 455 | 455 | async function listGalleryCommand(args) { |
| 456 | 456 | try { |
| 457 | 457 | let url = args.char ?? (args.group ? groups.find(it => it.name == args.group)?.id : null) ?? (selected_group || this_chid); |
| 458 | 458 | if (!args.char && !args.group && !selected_group && this_chid !== undefined) { |
| 459 | 459 | const char = characters[this_chid]; |
| 460 | 460 | url = char.avatar.replace('.png', ''); |
| 461 | 461 | } |