Skip to content

Commit

Permalink
Merge pull request #26 from niwaniwa/bugfix/fix-emoji-note
Browse files Browse the repository at this point in the history
fix: add emoji length check
  • Loading branch information
niwaniwa committed Jul 18, 2023
2 parents da191ca + 65a8e45 commit 7f53af6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion emoji.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func noteEmojiAdded(emojis []Emoji) {
builder.WriteString(":" + emoji.Name + ":")
}

message := core.NewString("#にりらみすきー部 \n 絵文字が追加されました \n" +
message := core.NewString("#にりらみすきー部 \n絵文字が追加されました\n" +
builder.String())

note(notes.CreateRequest{
Expand Down
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ func main() {
select {
case <-ticker.C:
emoji := emojiReconstruction()
noteEmojiAdded(emoji)
if len(emoji) != 0 {
noteEmojiAdded(emoji)
}
}
}
}()
Expand Down

0 comments on commit 7f53af6

Please sign in to comment.