| 239 | } |
| 240 | |
| 241 | func (e *FileElement) BuildContent() []byte { |
| 242 | content, _ := proto.Marshal(&message.FileExtra{ |
| 243 | File: &message.NotOnlineFile{ |
| 244 | FileSize: proto.Int64(int64(e.FileSize)), |
| 245 | FileType: proto.Int32(0), |
| 246 | FileUuid: proto.String(e.FileUUID), |
| 247 | FileMd5: e.FileMd5, |
| 248 | FileName: proto.String(e.FileName), |
| 249 | Subcmd: proto.Int32(1), |
| 250 | DangerEvel: proto.Int32(0), |
| 251 | ExpireTime: proto.Int32(int32(time.Now().Add(7 * 24 * time.Hour).Unix())), |
| 252 | FileHash: proto.String(e.FileHash), |
| 253 | }, |
| 254 | }) |
| 255 | return content |
| 256 | } |
| 257 | |
| 258 | func (e *MarketFaceElement) BuildElement() []*message.Elem { |
| 259 | mFace := &message.MarketFace{ |