Add since=all; make poll=1 default to since=all

This commit is contained in:
Philipp Heckel 2021-11-08 09:46:31 -05:00
parent 43c9a92748
commit d453db89a7
5 changed files with 43 additions and 14 deletions

View file

@ -55,8 +55,8 @@ func (c *sqliteCache) AddMessage(m *message) error {
return err
}
func (c *sqliteCache) Messages(topic string, since time.Time) ([]*message, error) {
rows, err := c.db.Query(selectMessagesSinceTimeQuery, topic, since.Unix())
func (c *sqliteCache) Messages(topic string, since sinceTime) ([]*message, error) {
rows, err := c.db.Query(selectMessagesSinceTimeQuery, topic, since.Time().Unix())
if err != nil {
return nil, err
}