Improve message reporting format
This commit is contained in:
parent
ab880148ad
commit
0c7fc7e866
|
@ -78,8 +78,19 @@ func Contact() http.HandlerFunc {
|
|||
|
||||
// Find this message, and attach it to the report.
|
||||
if msg, err := models.GetMessage(uint64(tableID)); err == nil {
|
||||
footer = fmt.Sprintf(
|
||||
"\n\n---\n\nThe reported DM said:\n\n%s",
|
||||
var username = "[unavailable]"
|
||||
if sender, err := models.GetUser(msg.SourceUserID); err == nil {
|
||||
username = sender.Username
|
||||
}
|
||||
|
||||
footer = fmt.Sprintf(`
|
||||
|
||||
---
|
||||
|
||||
From: <a href="/u/%s">@%s</a>
|
||||
|
||||
%s`,
|
||||
username, username,
|
||||
markdown.Quotify(msg.Message),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user