Crowd Voting Messaging Openfire Plugin

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:

  1. User 1 asks a question “Why is the sky blue?”

  2. Message (including prior conversation dialog) is distributed to 10 other random users.

  3. User2 reads the entire conversation and then suggests the response “How should I know?”

  1. This message is sent to the other 9 responders and appears on their screen to vote on
  2. A notification is sent to User1 to indicate that a response is 25% formed
  1. User3 reads the entire conversation and then suggests the response “That’s the way the atmosphere filters the white light from the sun.”
  1. This message is sent to the other 9 responders and appears on their screen to vote on
  2. A notification is sent to User1 to indicate that a response is 50% formed
  1. User4 reads the entire conversation and then suggests the response “To make you ask questions!”
  1. This message is sent to the other 9 responders and appears on their screen to vote on
  2. A notification is sent to User1 to indicate that a response is 75% formed
  1. User5 reads the entire conversation and then suggests the response “I have no idea.”
  1. This message is sent to the other 9 responders and appears on their screen to vote on
  2. A notification is sent to User1 to indicate that a response is 100% formed
  1. Meanwhile, users 2 through 11 are voting on their favorite responses and their votes are stored in the database

  2. 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!

I have seen something similar to this in teamchat app. I am building upon the conversation android app, whose source is opensource. I am also wondering if this was possible in openfire.