(self, chat_id: str)
| 479 | return chat_info |
| 480 | |
| 481 | def re_open_chat(self, chat_id: str): |
| 482 | chat = QuerySet(Chat).filter(id=chat_id).first() |
| 483 | if chat is None: |
| 484 | raise ChatException(500, _("Conversation does not exist")) |
| 485 | application = QuerySet(Application).filter(id=chat.application_id).first() |
| 486 | if application is None: |
| 487 | raise ChatException(500, _("Application does not exist")) |
| 488 | application_version = QuerySet(ApplicationVersion).filter(application_id=application.id).order_by( |
| 489 | '-create_time')[0:1].first() |
| 490 | if application_version is None: |
| 491 | raise ChatException(500, _("The application has not been published. Please use it after publishing.")) |
| 492 | if application.type == ApplicationTypeChoices.SIMPLE: |
| 493 | return self.re_open_chat_simple(chat_id, application) |
| 494 | else: |
| 495 | return self.re_open_chat_work_flow(chat_id, application) |
| 496 | |
| 497 | def re_open_chat_simple(self, chat_id, application): |
| 498 | # 数据集id列表 |
no test coverage detected