()
| 169 | } |
| 170 | |
| 171 | func (m *MediaContent) GetFile() *MessageFile { |
| 172 | if m.File != nil { |
| 173 | if _, ok := m.File.(*MessageFile); ok { |
| 174 | return m.File.(*MessageFile) |
| 175 | } |
| 176 | if itemMap, ok := m.File.(map[string]any); ok { |
| 177 | out := &MessageFile{ |
| 178 | FileName: common.Interface2String(itemMap["file_name"]), |
| 179 | FileData: common.Interface2String(itemMap["file_data"]), |
| 180 | FileId: common.Interface2String(itemMap["file_id"]), |
| 181 | } |
| 182 | return out |
| 183 | } |
| 184 | } |
| 185 | return nil |
| 186 | } |
| 187 | |
| 188 | type MessageImageUrl struct { |
| 189 | Url string `json:"url"` |
no test coverage detected