[Steemwatch] Do Not Send Notifications Related to Muted Users
[Steemwatch] Do Not Send Notifications Related to Muted Users
Issue
Currently when you mute a user on the blockchain, Steemwatch will still send alerts about their comments on your posts (if you have that feature turned on).
Recommendation
Please do not send notifications to a user if the generating user has been muted. For instance, if Bob mutes Alice on the blockchain and Alice comments on Bob's post, Bob will receive a Steemwatch alert for Alice's comment. What should happen in reality is that Bob is not notified via any of the methods Steemwatch is configured for.
Pseudo-code
// CommentPublished
func renderCommentPublishedEvent(event *events.CommentPublished) string {
c := event.Content
// return if user is muted by account
commentLines := make([]string, 0, 5)
scanner := bufio.NewScanner(strings.NewReader(c.Body))
for scanner.Scan() {
commentLines = append(commentLines, scanner.Text())
}
extractLines := commentLines
if len(extractLines) > 5 {
extractLines = extractLines[:5]
}
extract := strings.Join(extractLines, "\n")
if len(commentLines) > 5 {
extract += fmt.Sprintf("\n<https://steemit.com%v|Read more...>", c.URL)
}
return fmt.Sprintf(`
**-----**
%v commented on @%v/%v.
**Content:** %v
`,
steemitLink(c.Author),
c.URL,
c.ParentAuthor,
c.ParentPermlink,
extract,
)
}
Links
Open Source Contribution posted via Utopian.io
Leave [Steemwatch] Do Not Send Notifications Related to Muted Users to:
Read more #utopian-io posts
Best Posts From netuoso - HiveDevs
We have not curated any of netuoso's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From netuoso - HiveDevs
- MyAsk is designed for programmers but suitable for just about any person or vocation.
- MyAsk - Easiest AI Tool on the Market
- *** CLaiRE - Flagship Product Release Announcement***
- Tell Your Son to Stop Killing To End ALL War
- I still have not ended my life ...
- The Rainmaker - A Jungle Hike
- My Year 2022 in Review - Mental and Emotional Pain, Dark Night of the Soul, Meeting with God
- My Year 2022 in Review - Mental and Emotional Pain, Dark Night of the Soul, Meeting with God
- Proposal for Hive Core Development and Second Layer Integrations
- Qué camote!