mirror of
https://github.com/abhinavxd/libredesk.git
synced 2025-10-23 05:11:57 +00:00
@@ -462,6 +462,11 @@ func (m *Manager) InsertMessage(message *models.Message) error {
|
||||
message.Meta = json.RawMessage(`{}`)
|
||||
}
|
||||
|
||||
// Handle empty content type enum, default to text.
|
||||
if message.ContentType == "" {
|
||||
message.ContentType = models.ContentTypeText
|
||||
}
|
||||
|
||||
// Convert HTML content to text for search.
|
||||
message.TextContent = stringutil.HTML2Text(message.Content)
|
||||
|
||||
|
Reference in New Issue
Block a user