Feat rebrand armature (#43)
All checks were successful
All checks were successful
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #43.
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"switchboard-core/store"
|
||||
"armature/store"
|
||||
)
|
||||
|
||||
// SMTPConfig holds SMTP connection settings, loaded from platform_settings.
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"switchboard-core/events"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
"armature/events"
|
||||
"armature/models"
|
||||
"armature/store"
|
||||
)
|
||||
|
||||
// ── Package-level singleton ─────────────────
|
||||
@@ -53,7 +53,7 @@ func NewService(s store.NotificationStore, hub *events.Hub) *Service {
|
||||
return &Service{
|
||||
store: s,
|
||||
hub: hub,
|
||||
instanceName: "Switchboard Core",
|
||||
instanceName: "Armature",
|
||||
retentionDays: 90,
|
||||
stopCleanup: make(chan struct{}),
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"switchboard-core/models"
|
||||
"armature/models"
|
||||
)
|
||||
|
||||
// mockPrefStore implements store.NotificationPreferenceStore for testing.
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"switchboard-core/auth"
|
||||
"switchboard-core/events"
|
||||
"switchboard-core/models"
|
||||
"switchboard-core/store"
|
||||
"armature/auth"
|
||||
"armature/events"
|
||||
"armature/models"
|
||||
"armature/store"
|
||||
)
|
||||
|
||||
// ── Role Fallback ───────────────────────────
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"switchboard-core/models"
|
||||
"armature/models"
|
||||
)
|
||||
|
||||
// mockNotifStore implements store.NotificationStore for testing.
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"html/template"
|
||||
"strings"
|
||||
|
||||
"switchboard-core/models"
|
||||
"armature/models"
|
||||
)
|
||||
|
||||
// ── Template Data ───────────────────────────
|
||||
@@ -54,7 +54,7 @@ Adjust your notification preferences in Settings.
|
||||
// RenderHTML renders an HTML email body for a notification.
|
||||
func RenderHTML(n *models.Notification, instanceName string) string {
|
||||
if instanceName == "" {
|
||||
instanceName = "Switchboard Core"
|
||||
instanceName = "Armature"
|
||||
}
|
||||
data := emailData{
|
||||
Title: n.Title,
|
||||
@@ -73,7 +73,7 @@ func RenderHTML(n *models.Notification, instanceName string) string {
|
||||
// RenderText renders a plaintext email body for a notification.
|
||||
func RenderText(n *models.Notification, instanceName string) string {
|
||||
if instanceName == "" {
|
||||
instanceName = "Switchboard Core"
|
||||
instanceName = "Armature"
|
||||
}
|
||||
data := emailData{
|
||||
Title: n.Title,
|
||||
@@ -92,7 +92,7 @@ func RenderText(n *models.Notification, instanceName string) string {
|
||||
// SubjectForNotification returns an email subject line.
|
||||
func SubjectForNotification(n *models.Notification, instanceName string) string {
|
||||
if instanceName == "" {
|
||||
instanceName = "Switchboard Core"
|
||||
instanceName = "Armature"
|
||||
}
|
||||
prefix := "[" + instanceName + "] "
|
||||
switch {
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"switchboard-core/models"
|
||||
"armature/models"
|
||||
)
|
||||
|
||||
func TestRenderHTML_Basic(t *testing.T) {
|
||||
@@ -28,7 +28,7 @@ func TestRenderHTML_Basic(t *testing.T) {
|
||||
func TestRenderHTML_DefaultInstanceName(t *testing.T) {
|
||||
n := &models.Notification{Title: "Test"}
|
||||
html := RenderHTML(n, "")
|
||||
if !strings.Contains(html, "Switchboard Core") {
|
||||
if !strings.Contains(html, "Armature") {
|
||||
t.Error("expected default instance name")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user