69ceb1c33887 — Ted Unangst a month ago
make it optional to collect forwards
2 files changed, 3 insertions(+), 1 deletions(-)

M main.go
M web.go
M main.go +2 -0
@@ 48,6 48,7 @@ var iconName = "icon.png"
 var serverMsg template.HTML
 var aboutMsg template.HTML
 var loginMsg template.HTML
+var collectForwards = true
 
 func serverURL(u string, args ...interface{}) string {
 	return fmt.Sprintf("https://"+serverName+u, args...)

          
@@ 177,6 178,7 @@ func main() {
 	getconfig("slowtimeout", &slowTimeout)
 	getconfig("honkwindow", &honkwindow)
 	honkwindow *= 24 * time.Hour
+	getconfig("collectforwards", &collectForwards)
 
 	prepareStatements(db)
 

          
M web.go +1 -1
@@ 496,7 496,7 @@ func postinbox(w http.ResponseWriter, r 
 	origin := keymatch(keyname, who)
 	if origin == "" {
 		ilog.Printf("keyname actor mismatch: %s <> %s", keyname, who)
-		if what == "Create" {
+		if collectForwards && what == "Create" {
 			var xid string
 			obj, ok := j.GetMap("object")
 			if ok {