* 清理指定消息的所有附件 * @param pageId 页面ID * @param messageId 消息ID
(
pageId: string,
messageId: string
)
| 124 | * @param messageId 消息ID |
| 125 | */ |
| 126 | async cleanupMessageAttachments( |
| 127 | pageId: string, |
| 128 | messageId: string |
| 129 | ): Promise<{ success: boolean; error?: string }> { |
| 130 | try { |
| 131 | await cleanupMessageAttachmentFiles(pageId, messageId) |
| 132 | return { success: true } |
| 133 | } catch (error) { |
| 134 | console.error('清理消息附件失败:', error) |
| 135 | return { |
| 136 | success: false, |
| 137 | error: error instanceof Error ? error.message : '清理消息附件失败' |
| 138 | } |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | /** |
| 143 | * 清理指定页面的所有附件 |
no test coverage detected