diff --git a/poll/instance.go b/poll/instance.go index 5a44175..1b1352c 100644 --- a/poll/instance.go +++ b/poll/instance.go @@ -149,16 +149,20 @@ func PollMastodonPleroma(endpoint string, reportPostChan chan ReportPost) { if newpost.Id > min_id { min_id = newpost.Id } - newinstance := newpost.Account.Acct[at_sign+1:] - ri_mutex.Lock() - _, exists := runninginstances[newinstance] - if exists == false { - m := RunningInstance{} - runninginstances[newinstance] = m - go StartInstance(newinstance, reportPostChan) - } - ri_mutex.Unlock() + // Only done if we are crawling + if settings.Crawl == true { + newinstance := newpost.Account.Acct[at_sign+1:] + ri_mutex.Lock() + _, exists := runninginstances[newinstance] + if exists == false { + m := RunningInstance{} + runninginstances[newinstance] = m + go StartInstance(newinstance, reportPostChan) + } + + ri_mutex.Unlock() + } } time.Sleep(time.Second * 10) }