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

update pass follow config

parent addcea2b
...@@ -39,7 +39,8 @@ type TGTaskConfig struct { ...@@ -39,7 +39,8 @@ type TGTaskConfig struct {
} }
type TwitterTaskConfig struct { type TwitterTaskConfig struct {
URL string `toml:"url"` URL string `toml:"url"`
PassFollow bool `toml:"pass_follow"`
} }
type ServerConfig struct { type ServerConfig struct {
......
...@@ -110,7 +110,9 @@ func (d *Dao) DoTweetTask(twitterUserId int, tweetId int, twitterHandle, action ...@@ -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) { func (d *Dao) CheckTwitterFollow(twitterUserHandle string, followerId string) (ok bool, err error) {
return true, nil 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) 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") log.WithField("url", url).Debug("check tweet follow")
data, err := httpGet(url) 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