diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2019-08-09 17:59:16 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2019-08-09 17:59:16 +0300 |
commit | 3da482d48583a697e9cd0dab44d3147c9bc19387 (patch) | |
tree | db4c7e70185fe731abe66c8b59ebc7d3b28adca2 /api.go | |
parent | b87e42f3294318244deae8126b3ac18d543fd3d7 (diff) |
fix raw attachmentsv0.2.1
Diffstat (limited to 'api.go')
-rw-r--r-- | api.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -55,7 +55,7 @@ func (a *Api) bytesToProperUpdate(b []byte) UpdateInterface { case TypeMessageCreated: upd := new(MessageCreatedUpdate) _ = json.Unmarshal(b, upd) - for _, att := range upd.Message.Body.rawAttachments { + for _, att := range upd.Message.Body.RawAttachments { upd.Message.Body.Attachments = append(upd.Message.Body.Attachments, a.bytesToProperAttachment(att)) } return upd @@ -66,7 +66,7 @@ func (a *Api) bytesToProperUpdate(b []byte) UpdateInterface { case TypeMessageEdited: upd := new(MessageEditedUpdate) _ = json.Unmarshal(b, upd) - for _, att := range upd.Message.Body.rawAttachments { + for _, att := range upd.Message.Body.RawAttachments { upd.Message.Body.Attachments = append(upd.Message.Body.Attachments, a.bytesToProperAttachment(att)) } return upd |