Добавил включение/отключение NSFW штук
This commit is contained in:
parent
1f1c964e91
commit
fef2d2fdb6
4 changed files with 7 additions and 6 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -18,7 +18,7 @@ config.yaml
|
|||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
kiki
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
# vendor/
|
||||
|
||||
|
|
|
@ -9,9 +9,10 @@ import (
|
|||
)
|
||||
|
||||
type KikiSettings struct {
|
||||
Instance string `yaml:"instance,omitempty"`
|
||||
RSSUri string `yaml:"rss_url,omitempty"`
|
||||
Redis struct {
|
||||
Instance string `yaml:"instance,omitempty"`
|
||||
RSSUri string `yaml:"rss_url,omitempty"`
|
||||
Sensitive bool `yaml:"sensitive,omitempty"`
|
||||
Redis struct {
|
||||
Address string `yaml:"address"`
|
||||
} `yaml:"redis"`
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ func main() {
|
|||
if !inStack {
|
||||
log.Println(post.Description)
|
||||
|
||||
toot, err := tooter.CreateToot(*mastoClient, post)
|
||||
toot, err := tooter.CreateToot(*mastoClient, post, kikiConfig.Sensitive)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ func UploadPictures(mastoClient mastodon.Client, filesBytes [][]byte) []*mastodo
|
|||
return attachments
|
||||
}
|
||||
|
||||
func CreateToot(mastoClient mastodon.Client, newsDesc *gofeed.Item) (mastodon.Toot, error) {
|
||||
func CreateToot(mastoClient mastodon.Client, newsDesc *gofeed.Item, sensitive bool) (mastodon.Toot, error) {
|
||||
var imgArray []string
|
||||
var attachments []*mastodon.Attachment
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue