mirror of
https://github.com/muesli/telephant
synced 2024-11-15 00:07:10 +00:00
Fetch mentions on startup
This commit is contained in:
parent
cb491fc134
commit
177e6e538c
1 changed files with 9 additions and 1 deletions
|
@ -14,7 +14,8 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
initialFeedCount = 200
|
||||
initialFeedCount = 200
|
||||
initialNotificationsCount = 50
|
||||
)
|
||||
|
||||
// Account is a twitter account for Chirp.
|
||||
|
@ -101,6 +102,13 @@ func (mod *Account) Run(eventChan chan interface{}) {
|
|||
mod.handleStreamEvent(tweets[i])
|
||||
}
|
||||
|
||||
v.Set("count", strconv.FormatInt(initialNotificationsCount, 10))
|
||||
tweets, err = mod.twitterAPI.GetMentionsTimeline(v)
|
||||
mod.handleAnacondaError(err, "Could not get mention feed from Twitter API")
|
||||
for i := len(tweets) - 1; i >= 0; i-- {
|
||||
mod.handleStreamEvent(tweets[i])
|
||||
}
|
||||
|
||||
mod.handleStream()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue