Allow specifying a full JID
This commit is contained in:
parent
a31ee0fd38
commit
2747e3f502
@ -87,7 +87,7 @@ img.app, img.store {
|
||||
<article>
|
||||
<h1>J'ai déménagé !</h1>
|
||||
<p>Je suis désormais joignable pour tchatter sur le réseau indépendant Jabber/XMPP.</p>
|
||||
<p>Mon adresse XMPP : <strong>{{username}}@chapril.org</strong></p>
|
||||
<p>Mon adresse XMPP : <strong>{{user_jid}}</strong></p>
|
||||
<u>Pour me joindre :</u><br/>
|
||||
<p>1) Installe une appli Jabber/XMPP et crée-toi un compte</p>
|
||||
<ul id="downloads">
|
||||
@ -170,7 +170,7 @@ img.app, img.store {
|
||||
</div>
|
||||
-->
|
||||
<p>2) Puis ajoute mon adresse à ta liste de contacts en cliquant sur ce bouton :
|
||||
<a href="xmpp:{{username}}@chapril.org"><button class="button"><strong>{{username}}@chapril.org</strong></button></a>
|
||||
<a href="xmpp:{{user_jid}}"><button class="button"><strong>{{user_jid}}</strong></button></a>
|
||||
</p>
|
||||
</article>
|
||||
</body>
|
||||
|
@ -1,14 +1,20 @@
|
||||
#! /bin/sh
|
||||
|
||||
USERNAME=$(basename ${REQUEST_URI})
|
||||
DOMAIN=$(echo "${USERNAME}" | cut -d@ -f2)
|
||||
if [ "${USERNAME}" = "${DOMAIN}" ]; then
|
||||
USER_JID=${USERNAME}@chapril.org
|
||||
else
|
||||
USER_JID=${USERNAME}
|
||||
fi
|
||||
|
||||
echo "Content-type: text/html"
|
||||
echo ""
|
||||
|
||||
|
||||
#echo -n "<pre>" ; env ; echo "</pre>" # DEBUG
|
||||
#echo "<pre>USERNAME=${USERNAME}" ; echo "DOMAIN=$DOMAIN" ; echo "</pre>" # DEBUG
|
||||
|
||||
cat index.html.tpl | sed "s/{{username}}/${USERNAME}/g"
|
||||
cat index.html.tpl | sed "s/{{user_jid}}/${USER_JID}/g"
|
||||
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user