Passing information from Openfire to Fastpath Webchat

Hi Guys.

Im new at openfire and i want to extend the fastpath webchat plugin to add user image. I use the embedded database as my database provider. I have studied the code and figured out that the image is written in the database. What I did is save the image URL on the database and will retrieve it when a chat is started.

My problem is I cannot seem to figure out how to pass the image url from the openfire query to the webchat plugin. I tried understand the code but it is tougher than what I thought. Then I tried to connect to the embedded database but to no avail. I just want to query something from the database then pass the result to the webchat. Any ideas on where to start? Any help will be appreciated.