revert the funny addressing bits. for now.
This commit is contained in:
parent
64b710019e
commit
25a367d61c
19
fun.go
19
fun.go
|
@ -295,25 +295,6 @@ func grapevine(mentions []Mention) []string {
|
|||
return s
|
||||
}
|
||||
|
||||
func grapeape(userid int64, s string) []Mention {
|
||||
var mentions []Mention
|
||||
for _, m := range strings.Split(s, " ") {
|
||||
if m == "" {
|
||||
continue
|
||||
}
|
||||
var where string
|
||||
if name := fullname(m, userid); name != "" {
|
||||
where = name
|
||||
} else {
|
||||
where = gofish(m)
|
||||
}
|
||||
if where != "" {
|
||||
mentions = append(mentions, Mention{Who: m, Where: where})
|
||||
}
|
||||
}
|
||||
return mentions
|
||||
}
|
||||
|
||||
func bunchofgrapes(s string) []Mention {
|
||||
m := re_mentions.FindAllString(s, -1)
|
||||
var mentions []Mention
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
<p><label for=timeend>duration:</label><br>
|
||||
<input type="text" name="timeend" value="{{ .Duration }}">
|
||||
</div>
|
||||
<p><label for=mentions>to:</label><br>
|
||||
<input type="text" name="mentions" id=mentions value="{{ .Mentions }}">
|
||||
</details>
|
||||
<p>
|
||||
<textarea name="noise" id="honknoise">{{ .Noise }}</textarea>
|
||||
|
|
|
@ -257,10 +257,9 @@ function showhonkform(elem, rid, hname) {
|
|||
elem.insertAdjacentElement('afterend', form)
|
||||
}
|
||||
var ridinput = document.getElementById("ridinput")
|
||||
var elmentions = document.getElementById("mentions")
|
||||
if (rid) {
|
||||
ridinput.value = rid
|
||||
elmentions.value = hname
|
||||
honknoise.value = "@" + hname + " "
|
||||
} else {
|
||||
ridinput.value = ""
|
||||
honknoise.value = ""
|
||||
|
|
10
web.go
10
web.go
|
@ -1436,7 +1436,6 @@ func submitwebhonk(w http.ResponseWriter, r *http.Request) {
|
|||
func submithonk(w http.ResponseWriter, r *http.Request, isAPI bool) {
|
||||
rid := r.FormValue("rid")
|
||||
noise := r.FormValue("noise")
|
||||
mentions := r.FormValue("mentions")
|
||||
format := r.FormValue("format")
|
||||
if format == "" {
|
||||
format = "markdown"
|
||||
|
@ -1481,7 +1480,7 @@ func submithonk(w http.ResponseWriter, r *http.Request, isAPI bool) {
|
|||
noise = strings.Replace(noise, "\r", "", -1)
|
||||
noise = quickrename(noise, userinfo.UserID)
|
||||
noise = hooterize(noise)
|
||||
honk.Mentions = append(grapeape(userinfo.UserID, mentions), bunchofgrapes(noise)...)
|
||||
honk.Mentions = bunchofgrapes(noise)
|
||||
honk.Noise = noise
|
||||
translate(honk)
|
||||
|
||||
|
@ -1512,10 +1511,10 @@ func submithonk(w http.ResponseWriter, r *http.Request, isAPI bool) {
|
|||
} else {
|
||||
honk.Audience = []string{thewholeworld}
|
||||
}
|
||||
if mentions != "" {
|
||||
honk.Audience = append(grapevine(honk.Mentions), honk.Audience...)
|
||||
if honk.Noise != "" && honk.Noise[0] == '@' {
|
||||
honk.Audience = append(grapevine(bunchofgrapes(honk.Noise)), honk.Audience...)
|
||||
} else {
|
||||
honk.Audience = append(honk.Audience, grapevine(honk.Mentions)...)
|
||||
honk.Audience = append(honk.Audience, grapevine(bunchofgrapes(honk.Noise))...)
|
||||
}
|
||||
|
||||
if convoy == "" {
|
||||
|
@ -1677,7 +1676,6 @@ func submithonk(w http.ResponseWriter, r *http.Request, isAPI bool) {
|
|||
templinfo["MapLink"] = getmaplink(userinfo)
|
||||
templinfo["InReplyTo"] = r.FormValue("rid")
|
||||
templinfo["Noise"] = r.FormValue("noise")
|
||||
templinfo["Mentions"] = r.FormValue("mentions")
|
||||
templinfo["SavedFile"] = donkxid
|
||||
if tm := honk.Time; tm != nil {
|
||||
templinfo["ShowTime"] = ";"
|
||||
|
|
Loading…
Reference in New Issue