parent
db7b9d6e10
commit
725bb9b81a
2
go.mod
2
go.mod
|
@ -1,5 +1,7 @@
|
|||
module github.com/lynnesbian/mstdn-ebooks
|
||||
|
||||
replace github.com/mattn/go-mastodon => github.com/BenLubar-PR/go-mastodon v0.0.3-0.20181020214714-b83071c1d6fe // indirect
|
||||
|
||||
require (
|
||||
github.com/gorilla/websocket v1.4.0 // indirect
|
||||
github.com/mattn/go-mastodon v0.0.3-0.20180129050910-2ccbcfe14d7a
|
||||
|
|
4
go.sum
4
go.sum
|
@ -1,7 +1,7 @@
|
|||
github.com/BenLubar-PR/go-mastodon v0.0.3-0.20181020214714-b83071c1d6fe h1:QHvU/GniPgBLnR+unZL2uQCJFJim2k+khiq5tDARJd8=
|
||||
github.com/BenLubar-PR/go-mastodon v0.0.3-0.20181020214714-b83071c1d6fe/go.mod h1:FSdXZyYNF22wiS4coSWuDdmJwZIUbLeyoLoUxrTFvXQ=
|
||||
github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
|
||||
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/mattn/go-mastodon v0.0.3-0.20180129050910-2ccbcfe14d7a h1:poZfGmljz6MxMXvFcYQvTx7TJQ2J9Gb+B2lgjOIPQnA=
|
||||
github.com/mattn/go-mastodon v0.0.3-0.20180129050910-2ccbcfe14d7a/go.mod h1:/OSOSDJyV0OUlBuDV0Qrllizt3BJNj4Ir5xhckYRVmg=
|
||||
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 h1:nrZ3ySNYwJbSpD6ce9duiP+QkD3JuLCcWkdaehUS/3Y=
|
||||
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80/go.mod h1:iFyPdL66DjUD96XmzVL3ZntbzcflLnznH0fr99w5VqE=
|
||||
golang.org/x/net v0.0.0-20181017193950-04a2e542c03f h1:4pRM7zYwpBjCnfA1jRmhItLxYJkaEnsmuAcRtA347DA=
|
||||
|
|
3
main.go
3
main.go
|
@ -88,8 +88,7 @@ func main() {
|
|||
case *mastodon.DeleteEvent:
|
||||
// Ignore (for now)
|
||||
case *mastodon.NotificationEvent:
|
||||
if e.Notification.Type != "mention" {
|
||||
log.Printf("Ignoring notification of type %q", e.Notification.Type)
|
||||
if e.Notification.Type != "mention" || e.Notification.Account.Bot {
|
||||
continue
|
||||
}
|
||||
_, err := client.PostStatus(ctx, genToot(ctx, me, e.Notification.Status))
|
||||
|
|
Reference in New Issue