mirror of
https://github.com/mrusme/neonmodem.git
synced 2024-12-04 14:46:37 -05:00
Fixed reply to number on Discourse
This commit is contained in:
parent
8597200a5b
commit
c15ba4e10e
@ -51,7 +51,7 @@ type CategoryModel struct {
|
||||
TopicsYear int `json:"topics_year"`
|
||||
TopicsAllTime int `json:"topics_all_time"`
|
||||
IsUncategorized bool `json:"is_uncategorized"`
|
||||
SubcategoryIDs []string `json:"subcategory_ids"`
|
||||
SubcategoryIDs []int `json:"subcategory_ids"`
|
||||
SubcategoryList []CategoryModel `json:"subcategory_list"`
|
||||
UploadedLogo string `json:"uploaded_logo"`
|
||||
UploadedLogoDark string `json:"uploaded_logo_dark"`
|
||||
|
@ -314,11 +314,6 @@ func (sys *System) CreateReply(r *reply.Reply) error {
|
||||
return err
|
||||
}
|
||||
|
||||
inReplyTo, err := strconv.Atoi(r.InReplyTo)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var ap api.CreatePostModel
|
||||
|
||||
if r.Index == -1 {
|
||||
@ -330,10 +325,15 @@ func (sys *System) CreateReply(r *reply.Reply) error {
|
||||
}
|
||||
} else {
|
||||
// Apparently it's a reply to a comment in a post
|
||||
inReplyTo, err := strconv.Atoi(r.InReplyTo)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ap = api.CreatePostModel{
|
||||
Raw: r.Body,
|
||||
TopicID: inReplyTo,
|
||||
ReplyToPostNumber: r.Index,
|
||||
ReplyToPostNumber: r.Index + 1,
|
||||
CreatedAt: time.Now().Format(time.RFC3339Nano),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user