Force uniqueness with previews and logos on the fediverse. Closes #1777 and closes #1776

This commit is contained in:
Gabe Kangas
2022-03-17 13:09:38 -07:00
parent dc16eafea4
commit d1e39c4c1e
5 changed files with 33 additions and 3 deletions

View File

@@ -18,6 +18,7 @@ const (
streamTitleKey = "stream_title"
streamKeyKey = "stream_key"
logoPathKey = "logo_path"
logoUniquenessKey = "logo_uniqueness"
serverSummaryKey = "server_summary"
serverWelcomeMessageKey = "server_welcome_message"
serverNameKey = "server_name"
@@ -125,6 +126,22 @@ func SetLogoPath(logo string) error {
return _datastore.SetString(logoPathKey, logo)
}
// SetLogoUniquenessString will set the logo cache busting string.
func SetLogoUniquenessString(uniqueness string) error {
return _datastore.SetString(logoUniquenessKey, uniqueness)
}
// GetLogoUniquenessString will return the logo cache busting string.
func GetLogoUniquenessString() string {
uniqueness, err := _datastore.GetString(logoUniquenessKey)
if err != nil {
log.Traceln(logoUniquenessKey, err)
return ""
}
return uniqueness
}
// GetServerSummary will return the server summary text.
func GetServerSummary() string {
summary, err := _datastore.GetString(serverSummaryKey)