|
@@ -78,8 +78,9 @@ func (m *Media) ToMediaView() (message *MediaView) {
|
|
|
image, err := GetImageById(m.CoverSrc)
|
|
|
if err != nil || image == nil {
|
|
|
message.CoverSrc = ""
|
|
|
+ } else {
|
|
|
+ message.CoverSrc = image.SrcUrl
|
|
|
}
|
|
|
- message.CoverSrc = image.SrcUrl
|
|
|
ids := strings.Split(m.PermissionIds, ",")
|
|
|
var idList []int
|
|
|
for _, id := range ids {
|
|
@@ -117,8 +118,9 @@ func (m *Media) ToMessageView() (message *MessageMedia) {
|
|
|
image, err := GetImageById(m.CoverSrc)
|
|
|
if err != nil || image == nil {
|
|
|
message.CoverSrc = ""
|
|
|
+ } else {
|
|
|
+ message.CoverSrc = image.SrcUrl
|
|
|
}
|
|
|
- message.CoverSrc = image.SrcUrl
|
|
|
ids := strings.Split(m.PermissionIds, ",")
|
|
|
var idList []int
|
|
|
for _, id := range ids {
|