mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-07 05:30:31 -06:00
fix: message coercion bug affecting vision
This commit is contained in:
@@ -48,7 +48,7 @@ module.exports = class Messages {
|
||||
if ( whatis(message.content[i]) !== 'object' ) {
|
||||
throw new Error('each message content item must be a string or object');
|
||||
}
|
||||
if ( ! message.content[i].type ) {
|
||||
if ( typeof message.content[i].text === 'string' && ! message.content[i].type ) {
|
||||
message.content[i].type = 'text';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user