Commit d21816cc authored by Pete Matern's avatar Pete Matern Committed by pete

ImagePresenceProvider now sends an http redirect to images when specified by...

ImagePresenceProvider now sends an http redirect to images when specified by the client. Default images are still served as before.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3776 b35dd754-fafc-0310-a699-88a17e54d16e
parent 4c2bebea
...@@ -114,7 +114,8 @@ The following parameters can be passed into the request:<p> ...@@ -114,7 +114,8 @@ The following parameters can be passed into the request:<p>
"http://www.example.com/images/--IMAGE--.gif". The token will be dynamically "http://www.example.com/images/--IMAGE--.gif". The token will be dynamically
replaced with one of the following values depending on the presence status: replaced with one of the following values depending on the presence status:
<b>available</b>, <b>chat</b>, <b>away</b>, <b>xa</b>, <b>dnd</b>, <b>available</b>, <b>chat</b>, <b>away</b>, <b>xa</b>, <b>dnd</b>,
<b>offline</b>, or <b>forbidden</b>. <b>offline</b>, or <b>forbidden</b>. If this option is used, the presence service
will respond with an http redirect pointing to the supplied image url.
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -92,7 +92,7 @@ class ImagePresenceProvider extends PresenceInfoProvider { ...@@ -92,7 +92,7 @@ class ImagePresenceProvider extends PresenceInfoProvider {
writeImageContent(request.getParameter(presenceType), defaultImage, response); writeImageContent(request.getParameter(presenceType), defaultImage, response);
} }
else if (images != null) { else if (images != null) {
writeImageContent(images.replace("--IMAGE--", presenceType), defaultImage, response); response.sendRedirect(images.replace("--IMAGE--", presenceType));
} }
else { else {
writeImageContent(null, defaultImage, response); writeImageContent(null, defaultImage, response);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment