chat backs
This commit is contained in:
parent
43208dcf51
commit
afcbbd8d75
2
fun.go
2
fun.go
|
@ -190,7 +190,7 @@ func filterchonk(ch *Chonk) {
|
||||||
if short := shortname(ch.UserID, ch.Who); short != "" {
|
if short := shortname(ch.UserID, ch.Who); short != "" {
|
||||||
ch.Handle = short
|
ch.Handle = short
|
||||||
} else {
|
} else {
|
||||||
_, ch.Handle = handles(ch.Who)
|
ch.Handle, _ = handles(ch.Who)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,10 +15,22 @@
|
||||||
{{ $chonkcsrf := .ChonkCSRF }}
|
{{ $chonkcsrf := .ChonkCSRF }}
|
||||||
{{ range .Chatter }}
|
{{ range .Chatter }}
|
||||||
<section class="honk">
|
<section class="honk">
|
||||||
|
{{ $target := "" }}
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
|
{{ if eq $target "" }}
|
||||||
|
{{ $target = .Target }}
|
||||||
|
<p>chatter: {{ .Target }}
|
||||||
|
{{ end }}
|
||||||
<p>
|
<p>
|
||||||
{{ .Handle }}: {{ .HTML }}
|
{{ .Handle }}: {{ .HTML }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
<form action="/sendchonk" method="POST">
|
||||||
|
<input type="hidden" name="CSRF" value="{{ $chonkcsrf }}">
|
||||||
|
<input type="hidden" name="target" value="{{ $target }}" autocomplete=off>
|
||||||
|
<p><label for=noise>noise:</label><br>
|
||||||
|
<textarea name="noise" id="noise"></textarea>
|
||||||
|
<p><button name="chonk" value="chonk">chonk</button>
|
||||||
|
</form>
|
||||||
</section>
|
</section>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</main>
|
</main>
|
||||||
|
|
Loading…
Reference in New Issue