Commit c81cd501 authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

update pass follow config

parent addcea2b
......@@ -40,6 +40,7 @@ type TGTaskConfig struct {
type TwitterTaskConfig struct {
URL string `toml:"url"`
PassFollow bool `toml:"pass_follow"`
}
type ServerConfig struct {
......
......@@ -110,7 +110,9 @@ func (d *Dao) DoTweetTask(twitterUserId int, tweetId int, twitterHandle, action
}
func (d *Dao) CheckTwitterFollow(twitterUserHandle string, followerId string) (ok bool, err error) {
if d.c.TwitterTask.PassFollow {
return true, nil
}
url := fmt.Sprintf("%s/verify/follower?task_id=%s&follower_id=%s", strings.TrimSuffix(d.c.TwitterTask.URL, "/"), twitterUserHandle, followerId)
log.WithField("url", url).Debug("check tweet follow")
data, err := httpGet(url)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment