Non riesco ad aggiungere un post “whisper” tramite l’API. Sto passando il campo Whisper impostato su true nella struct Go fornita.
type Post struct {
TopicID int `json:"topic_id"`
Raw string `json:"raw"`
CreatedAt time.Time `json:"created_at"`
PostType int `json:"post_type"`
Whisper bool `json:"whisper"`
}
Né impostare whisper su true né impostare post_type su 4 sembra funzionare per me. Il post viene aggiunto, ma non è un whisper. Tuttavia, riesco ad aggiungere un whisper tramite l’interfaccia utente, il che chiarisce che non si tratta di un problema di privilegi. Qualcuno può aiutarmi a capire cosa sto sbagliando?
This seems to be working, but why whisper=true is not returned in response. Instead I see post_type=4 in all the whispers as opposed to post_type=1, does that mean something or not.
Yes, that is a good thing. post_type=4 is a whisper post, which means it was created successfully. If it comes back at post_type=1 then it isn’t a whisper, but just a regular post.
The interface for creating posts just doesn’t allow you to pass in a post_type, but instead requires you to specify whisper=true.