load donks for chonks

This commit is contained in:
Ted Unangst 2020-05-15 00:18:50 -04:00
parent 5acf6ef5ce
commit 6be05df143
1 changed files with 3 additions and 0 deletions

View File

@ -546,6 +546,7 @@ func loadchatter(userid int64) map[string][]*Chonk {
}
defer rows.Close()
chonks := make(map[string][]*Chonk)
var allchonks []*Chonk
for rows.Next() {
ch := new(Chonk)
var dt string
@ -556,7 +557,9 @@ func loadchatter(userid int64) map[string][]*Chonk {
}
ch.Date, _ = time.Parse(dbtimeformat, dt)
chonks[ch.Target] = append(chonks[ch.Target], ch)
allchonks = append(allchonks, ch)
}
donksforchonks(allchonks)
return chonks
}