Add media type to message media url
Currently we don't have a message media type on the message media URL and we always have to link to message just for the type. We need to do two things.
- Add media_type column to message media table (nullable)
- Get type from the URL and update the existing one.
@pankaj-ag as media table is linked with messages. We already have information about media type in the messages table. Wouldn't it be an identical column repeated?
gupshup does not give us the type of media file when we xfer to GCS, we determine the type seems like they recently added contentType check: https://www.gupshup.io/developer/docs/bot-platform/guide/whatsapp-api-documentation#media we should add this to the messagesMedia table
also media type is different from content type which is a mime type
@AkhileshNegi I thought I close this issue or updated the comment.
There was a use case where we need to have a media type (in search or somewhere else) and do that we always join that table to messages which is a huge table. So to remove that join just for the type I thought let's save the media type here as well.
But later I thought the content type would be better info to store in the database.