We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
bot
1 parent 85fa954 commit abccb86Copy full SHA for abccb86
models/user/user.go
@@ -406,6 +406,11 @@ func (u *User) IsIndividual() bool {
406
return u.Type == UserTypeIndividual
407
}
408
409
+// IsBot returns whether or not the user is of type bot
410
+func (u *User) IsBot() bool {
411
+ return u.Type == UserTypeBot
412
+}
413
+
414
// DisplayName returns full name if it's not empty,
415
// returns username otherwise.
416
func (u *User) DisplayName() string {
templates/shared/user/authorlink.tmpl
@@ -1 +1 @@
1
-<a class="author text black gt-font-semibold muted"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>
+<a class="author text black gt-font-semibold muted"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>{{if .IsBot}}<span class="ui basic label gt-p-2">bot</span>{{end}}
0 commit comments