                             let realm = message.realm
                             realm.beginWriteTransaction()
                             message.localAttachmentName = fileURL.path!.lastPathComponent.stringByDeletingPathExtension
+                            message.mediaType = MessageMediaType.Audio.rawValue
                             realm.commitWriteTransaction()
 
                             self.updateConversationCollectionView()

                            let realm = message.realm
                            realm.beginWriteTransaction()
                            message.localAttachmentName = fileURL.path!.lastPathComponent.stringByDeletingPathExtension
                            realm.commitWriteTransaction()

                            self.updateConversationCollectionView()

                        let realm = message.realm
                        realm.beginWriteTransaction()
                        message.localAttachmentName = messageImageName
                        message.mediaType = MessageMediaType.Image.rawValue
                        realm.commitWriteTransaction()
                    }

