 }
 
 func videoMetaOfMessage(message: Message) -> (width: CGFloat, height: CGFloat)? {
+
+    guard !message.invalidated else {
+        return nil
+    }
 
     if let mediaMetaData = message.mediaMetaData {
         if let metaDataInfo = decodeJSON(mediaMetaData.data) {

}

func blurredThumbnailImageOfMessage(message: Message) -> UIImage? {

    if let mediaMetaData = message.mediaMetaData {
        if let metaDataInfo = decodeJSON(mediaMetaData.data) {


func imageMetaOfMessage(message: Message) -> (width: CGFloat, height: CGFloat)? {

    guard !message.invalidated else {
        return nil
    }

    if let mediaMetaData = message.mediaMetaData {
        if let metaDataInfo = decodeJSON(mediaMetaData.data) {
            if let
