diff --git a/app/store/comment.go b/app/store/comment.go index 100fb765..394870c9 100644 --- a/app/store/comment.go +++ b/app/store/comment.go @@ -58,22 +58,6 @@ type BlockedUser struct { Timestamp time.Time `json:"time"` } -// NotifUser holds id and destination for notifiable user -type NotifUser struct { - ID string `json:"id"` - Destination string `json:"destination"` -} - -// NotifScope defines "enum" of notification scopes -type NotifScope int - -// All NotifScope values -const ( - ScopeSite NotifScope = 1 - ScopePost NotifScope = 2 - ScopeReply NotifScope = 3 -) - // Sanitize clean dangerous html/js from the comment func (c *Comment) Sanitize() { p := bluemonday.UGCPolicy() @@ -94,3 +78,19 @@ func (c *Comment) Mask() { c.Votes = map[string]bool{} c.Edit = nil } + +// NotifUser holds id and destination for notifiable user +type NotifUser struct { + ID string `json:"id"` + Destination string `json:"destination"` +} + +// NotifScope defines "enum" of notification scopes +type NotifScope int + +// All NotifScope values +const ( + ScopeSite NotifScope = 1 + ScopePost NotifScope = 2 + ScopeReply NotifScope = 3 +) diff --git a/app/store/store.go b/app/store/store.go index 2ea988ff..76d4b376 100644 --- a/app/store/store.go +++ b/app/store/store.go @@ -33,7 +33,7 @@ type Admin interface { Blocked(siteID string) ([]BlockedUser, error) // get list of blocked users } -// Notifier defines all store ops to store/retrive notification info for users +// Notifier defines all store ops to store/retrieve notification info for users type Notifier interface { Set(locator Locator, user NotifUser, scope NotifScope, status bool) error // subscribe / unsubscribe user to locator updates Status(locator Locator, userID string) bool // get subscription status for user & locator