cmd/mi: ignore bot posts

This commit is contained in:
Cadey Ratio 2020-01-11 22:17:06 +00:00
parent 81bde08e37
commit 189ebfcd6b
1 changed files with 13 additions and 3 deletions

View File

@ -83,9 +83,10 @@ type MastodonStatus struct {
Account struct {
Acct string `json:"acct"`
} `json:"account"`
URL string `json:"url"`
Content string `json:"content"`
Sensitive bool `json:"sensitive"`
URL string `json:"url"`
Content string `json:"content"`
Sensitive bool `json:"sensitive"`
Application *madon.Application `json:"application"`
}
type NewStatus struct {
@ -127,8 +128,17 @@ func (mi *Mi) StreamMastodonToTwitter(ctx context.Context) {
if err != nil {
ln.FatalErr(ctx, err)
}
if ns.NewVal == nil {
continue
}
st := ns.NewVal
if st.Application.Name == "mi_irl" {
continue
}
if st.Sensitive {
continue
}