Mark the lead's messages and answers as the lead's, not the human's
This commit is contained in:
@@ -92,18 +92,19 @@ func decisionLine(item api.InboxItem, r api.InboxResponse) string {
|
||||
if r.Text != nil {
|
||||
text = strings.TrimSpace(*r.Text)
|
||||
}
|
||||
who := actorName(r.User)
|
||||
switch r.Type {
|
||||
case api.Option:
|
||||
line := fmt.Sprintf("%s chose: %s\n", r.User, strings.Join(*r.Options, "; "))
|
||||
line := fmt.Sprintf("%s chose: %s\n", who, strings.Join(*r.Options, "; "))
|
||||
if item.Payload["multiple"] == true {
|
||||
line = fmt.Sprintf("%s checked: %s\n", r.User, strings.Join(*r.Options, "; "))
|
||||
line = fmt.Sprintf("%s checked: %s\n", who, strings.Join(*r.Options, "; "))
|
||||
}
|
||||
if text != "" {
|
||||
line += fmt.Sprintf("%s added: %s\n", r.User, text)
|
||||
line += fmt.Sprintf("%s added: %s\n", who, text)
|
||||
}
|
||||
return line
|
||||
case api.Other:
|
||||
return fmt.Sprintf("%s answered: %s\n", r.User, text)
|
||||
return fmt.Sprintf("%s answered: %s\n", who, text)
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user