This commit is contained in:
commit
fc567f7f69
2
.hgtags
2
.hgtags
|
@ -36,3 +36,5 @@ dac64bc6a93cedeb6ae618cba8f8647af96d2ece v0.9.3
|
||||||
6a522536238fe25b6d048543f52ed406ccf720b2 v0.9.6
|
6a522536238fe25b6d048543f52ed406ccf720b2 v0.9.6
|
||||||
bc1bcfb9c0cc86b3c63325b07e13a36b9d4500f0 v0.9.7
|
bc1bcfb9c0cc86b3c63325b07e13a36b9d4500f0 v0.9.7
|
||||||
916cefdc24363b6e7e193dbde82632c17f58adfd v0.9.8
|
916cefdc24363b6e7e193dbde82632c17f58adfd v0.9.8
|
||||||
|
4b8cf31560b7d1e1696af109b158766c4ce823ab v0.9.9
|
||||||
|
d7c3a01e7aaef67c40920bbc4e8507350fc33e31 v0.9.91
|
||||||
|
|
|
@ -1932,14 +1932,17 @@ func followyou(user *WhatAbout, honkerid int64, sync bool) {
|
||||||
}
|
}
|
||||||
func unfollowyou(user *WhatAbout, honkerid int64, sync bool) {
|
func unfollowyou(user *WhatAbout, honkerid int64, sync bool) {
|
||||||
db := opendatabase()
|
db := opendatabase()
|
||||||
row := db.QueryRow("select xid, owner, folxid from honkers where honkerid = ? and userid = ? and flavor in ('sub')",
|
row := db.QueryRow("select xid, owner, folxid, flavor from honkers where honkerid = ? and userid = ? and flavor in ('unsub', 'peep', 'presub', 'sub')",
|
||||||
honkerid, user.ID)
|
honkerid, user.ID)
|
||||||
var url, owner, folxid string
|
var url, owner, folxid, flavor string
|
||||||
err := row.Scan(&url, &owner, &folxid)
|
err := row.Scan(&url, &owner, &folxid, &flavor)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
elog.Printf("can't get honker xid: %s", err)
|
elog.Printf("can't get honker xid: %s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if flavor == "peep" {
|
||||||
|
return
|
||||||
|
}
|
||||||
ilog.Printf("unsubscribing from %s", url)
|
ilog.Printf("unsubscribing from %s", url)
|
||||||
_, err = db.Exec("update honkers set flavor = ? where honkerid = ?", "unsub", honkerid)
|
_, err = db.Exec("update honkers set flavor = ? where honkerid = ?", "unsub", honkerid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
changelog
|
changelog
|
||||||
|
|
||||||
=== next
|
=== 0.9.91 One More Time
|
||||||
|
|
||||||
|
+ Swallow a follow bug.
|
||||||
|
|
||||||
|
=== 0.9.9 Eat the Bugs
|
||||||
|
|
||||||
+ Some fixes for image descriptions.
|
+ Some fixes for image descriptions.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
PROGS=autobonker gettoken saytheday sprayandpray wonkawonk youvegothonks
|
PROGS=autobonker gettoken saytheday sprayandpray youvegothonks
|
||||||
|
|
||||||
all: $(PROGS)
|
all: $(PROGS)
|
||||||
|
|
||||||
|
@ -18,8 +18,5 @@ saytheday: saytheday.go
|
||||||
sprayandpray: sprayandpray.go
|
sprayandpray: sprayandpray.go
|
||||||
go build sprayandpray.go
|
go build sprayandpray.go
|
||||||
|
|
||||||
wonkawonk: wonkawonk.go fetch.go
|
|
||||||
go build wonkawonk.go fetch.go
|
|
||||||
|
|
||||||
youvegothonks: youvegothonks.go
|
youvegothonks: youvegothonks.go
|
||||||
go build youvegothonks.go
|
go build youvegothonks.go
|
||||||
|
|
5
web.go
5
web.go
|
@ -1964,7 +1964,8 @@ func submithonker(w http.ResponseWriter, r *http.Request) *Honker {
|
||||||
flavor = "peep"
|
flavor = "peep"
|
||||||
}
|
}
|
||||||
|
|
||||||
id, err := savehonker(user, url, name, flavor, combos, mj)
|
var err error
|
||||||
|
honkerid, err = savehonker(user, url, name, flavor, combos, mj)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, "had some trouble with that: "+err.Error(), http.StatusInternalServerError)
|
http.Error(w, "had some trouble with that: "+err.Error(), http.StatusInternalServerError)
|
||||||
return nil
|
return nil
|
||||||
|
@ -1972,7 +1973,7 @@ func submithonker(w http.ResponseWriter, r *http.Request) *Honker {
|
||||||
if flavor == "presub" {
|
if flavor == "presub" {
|
||||||
followyou(user, honkerid, false)
|
followyou(user, honkerid, false)
|
||||||
}
|
}
|
||||||
h.ID = id
|
h.ID = honkerid
|
||||||
return h
|
return h
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue