| 1492 | } |
| 1493 | |
| 1494 | func commentToMessage(comment *models.Comment) *reddit1.Message { |
| 1495 | if comment == nil { |
| 1496 | return nil |
| 1497 | } |
| 1498 | return &reddit1.Message{ |
| 1499 | ID: comment.ID, |
| 1500 | Name: string(comment.GetID()), |
| 1501 | CreatedUTC: uint64(comment.CreatedUTC), |
| 1502 | Author: comment.Author, |
| 1503 | Body: comment.Body, |
| 1504 | BodyHTML: comment.BodyHTML, |
| 1505 | Context: comment.Permalink, |
| 1506 | ParentID: string(comment.ParentID), |
| 1507 | Subreddit: comment.Subreddit, |
| 1508 | WasComment: true, |
| 1509 | } |
| 1510 | } |
| 1511 | |
| 1512 | type RedditPageJSON []struct { |
| 1513 | Data struct { |