New feature: Polls
Hello everyone,
I have developed a poll feature for Damus that uses Nostr's reaction kind 7 to allow for voting.
In Damus options, the user can choose to see the votes of their friends as well as their friends' friends, or from everyone. By default, it is set to friends + friends' friends to prevent bots from spamming opinions.
It is now possible to create polls directly from the post writing panel.
I have also included a fix in this PR that prevents Damus from associating any reaction to a like, which was previously the case even if it was a thumbs down for the example.
I hope you enjoy it, I have also included a screenshot here:

Nice :-)
interesting...
why not just make it a different kind? it feels wrong using reactions for this.
I will try making a new NIP for that, just at the moment, I thought it wasn't necessary :)
Working on the NIP right now :)
we don't need a NIP yet, we just can just choose something and spec it after
but if you want to go for it lol
agreed, go and we gonna support both in the future if poll nip is accepted @jb55
I added the code of the NIP 41, when it will be accepted, I will change again the code if needed it will be ready to be merged :)
NIP 41 ref: https://github.com/nostr-protocol/nips/pull/148
Would look cool with the linear gradient for the bars :-)
LinearGradient(gradient: Gradient(colors: [
Color("DamusPurple"),
Color("DamusBlue")
]), startPoint: .topTrailing, endPoint: .bottomTrailing)
Would look cool with the linear gradient for the bars :-)
LinearGradient(gradient: Gradient(colors: [ Color("DamusPurple"), Color("DamusBlue") ]), startPoint: .topTrailing, endPoint: .bottomTrailing)
Will add it today, thanks :)
What does the Ui look like whilst creating the poll?

@BenGWeeks
With regards to the post button - was thinking better UX/UI would be to display but greyed out until created a message? (As apposed to hide, where I've thought to myself "if i write this message how will I be able to post it?")
With regards to the post button - was thinking better UX/UI would be to display but greyed out until created a message? (As apposed to hide, where I've thought to myself "if i write this message how will I be able to post it?")
Will add it too :)
(That's generic to all posts)
this needs to be its own view instead of putting in eventview
closing this for now since it's pretty out of date