work on emojis

This commit is contained in:
tsmethurst 2021-04-14 18:16:58 +02:00
commit 32629a378d
31 changed files with 605 additions and 67 deletions

View file

@ -25,9 +25,9 @@ type Emoji struct {
ID string `pg:"type:uuid,default:gen_random_uuid(),pk,notnull"`
// String shortcode for this emoji -- the part that's between colons. This should be lowercase a-z_
// eg., 'blob_hug' 'purple_heart' Must be unique with domain.
Shortcode string `pg:"notnull,unique:shortcodedomain"`
// Origin domain of this emoji, eg 'example.org', 'queer.party'. Null for local emojis.
Domain string `pg:",unique:shortcodedomain"`
Shortcode string `pg:",notnull,unique:shortcodedomain"`
// Origin domain of this emoji, eg 'example.org', 'queer.party'. empty string for local emojis.
Domain string `pg:",notnull,default:'',use_zero,unique:shortcodedomain"`
// When was this emoji created. Must be unique with shortcode.
CreatedAt time.Time `pg:"type:timestamp,notnull,default:now()"`
// When was this emoji updated

View file

@ -49,7 +49,7 @@ type Status struct {
// cw string for this status
ContentWarning string
// visibility entry for this status
Visibility Visibility
Visibility Visibility `pg:",notnull"`
// mark the status as sensitive?
Sensitive bool
// what language is this status written in?
@ -95,6 +95,8 @@ const (
VisibilityMutualsOnly Visibility = "mutuals_only"
// This status is visible only to mentioned recipients
VisibilityDirect Visibility = "direct"
// Default visibility to use when no other setting can be found
VisibilityDefault Visibility = "public"
)
type VisibilityAdvanced struct {