aboutsummaryrefslogtreecommitdiff
path: root/OutboxPost.go
diff options
context:
space:
mode:
authorFChannel <=>2021-01-31 23:18:21 -0800
committerFChannel <=>2021-01-31 23:18:21 -0800
commit3bedb51f6a878253cfdf10ab89c67312fcd93886 (patch)
tree8e81ca4bda88d590ffdacbb01555a59b92ed0fd6 /OutboxPost.go
parent4a80553734f985dbbdf64b6c289a3985c0bc0880 (diff)
preload metadata of video to see first frame
Diffstat (limited to 'OutboxPost.go')
-rw-r--r--OutboxPost.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/OutboxPost.go b/OutboxPost.go
index b51e7cc..f509b04 100644
--- a/OutboxPost.go
+++ b/OutboxPost.go
@@ -503,8 +503,10 @@ func CheckCaptcha(db *sql.DB, captcha string) bool {
path := "public/" + parts[0] + ".png"
code := GetCaptchaCodeDB(db, path)
- DeleteCaptchaCodeDB(db, path)
- CreateNewCaptcha(db)
+ if code != "" {
+ DeleteCaptchaCodeDB(db, path)
+ CreateNewCaptcha(db)
+ }
if (code == strings.ToUpper(parts[1])) {
return true