>>102817642
when you're parsing the message content, you should check if it's a list
if it's a list, get the value of "text" for every element and then merge them
def process_content(content):
if isinstance(content, list) and content and isinstance(content[0], dict):
return ' '.join(item.get('text', '') for item in content if item.get('type') == 'text')
elif isinstance(content, str):
return content
else:
return ''