feat(19-04): add users.handle, HandleGenerator and user.Created
Generate a unique mention handle on API register and admin create, and fire user.Created from both paths so listeners run in the same write. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -33,6 +33,10 @@ type User struct {
|
||||
TokensValidAfter *time.Time `gorm:"column:tokens_valid_after"`
|
||||
CreatedIPAddress *string `gorm:"column:created_ip_address"`
|
||||
LastIPAddress *string `gorm:"column:last_ip_address"`
|
||||
// Handle is the unique @mention identity (D-15). Generated on create,
|
||||
// never mass-assigned, and omitted from user API payloads unless a
|
||||
// golden requires it.
|
||||
Handle *string `gorm:"column:handle" json:"-"`
|
||||
// LastSeen is stamped by login and token refresh, at most once per five
|
||||
// minutes (classes.TouchLastSeen). It is shown in the admin list and is
|
||||
// never part of a user API payload.
|
||||
|
||||
Reference in New Issue
Block a user