Skip to content

Commit ee24031

Browse files
committed
Check if page revision is a 403 error too
1 parent e2ad13f commit ee24031

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/discourse/post.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ func GetNumPostRevisionsByID(client *Client, id int) (response int, err error) {
171171

172172
if err == nil {
173173
return secondRevision.VersionCount, nil
174-
} else if strings.Contains(fmt.Sprint(err), "404") {
174+
} else if strings.Contains(fmt.Sprint(err), "404") || strings.Contains(fmt.Sprint(err), "403") {
175175
_, postExistsErr := GetPostByID(client, id)
176176

177177
if postExistsErr == nil {

0 commit comments

Comments
 (0)