Skip to content

Commit c04bedc

Browse files
committed
feat: import the mime-type for each comment
1 parent 0735953 commit c04bedc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/collective/exportimport/import_other.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,8 @@ def import_data(self, data):
635635
conversation = IConversation(obj)
636636

637637
for item in conversation_data["conversation"]["items"]:
638-
638+
if isinstance(item["text"], dict) and item["text"].get("mime-type"):
639+
item["mime-type"] = item["text"]["mime-type"]
639640
if isinstance(item["text"], dict) and item["text"].get("data"):
640641
item["text"] = item["text"]["data"]
641642

@@ -654,6 +655,7 @@ def import_data(self, data):
654655
.replace(u"\r<br />", u"\r\n")
655656
.replace(u"<br />", u"\r\n")
656657
)
658+
comment.mime_type = item.get("mime-type", None)
657659

658660
if item["user_notification"]:
659661
comment.user_notification = True

0 commit comments

Comments
 (0)