Hi fellow devs,
I’m working on implementing a messaging app where a crowd of users suggest responses to a conversation and then vote on the suggested responses. The winning response is the one sent back to the asker.
Could you please take a moment to point me in the right direction on how this could be implemented?
For example:
-
User 1 asks a question “Why is the sky blue?”
-
Message (including prior conversation dialog) is distributed to 10 other random users.
-
User2 reads the entire conversation and then suggests the response “How should I know?”
- This message is sent to the other 9 responders and appears on their screen to vote on
- A notification is sent to User1 to indicate that a response is 25% formed
- User3 reads the entire conversation and then suggests the response “That’s the way the atmosphere filters the white light from the sun.”
- This message is sent to the other 9 responders and appears on their screen to vote on
- A notification is sent to User1 to indicate that a response is 50% formed
- User4 reads the entire conversation and then suggests the response “To make you ask questions!”
- This message is sent to the other 9 responders and appears on their screen to vote on
- A notification is sent to User1 to indicate that a response is 75% formed
- User5 reads the entire conversation and then suggests the response “I have no idea.”
- This message is sent to the other 9 responders and appears on their screen to vote on
- A notification is sent to User1 to indicate that a response is 100% formed
-
Meanwhile, users 2 through 11 are voting on their favorite responses and their votes are stored in the database
-
When all 10 responders have voted on the 4 suggested responses, the one with the most votes is sent to User1 and added to the conversation.
How can I extend Openfire to support this type of functionality?
Thanks much for your help!