Changeset 0.32.0 (#206)
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.gobha.me/xcaliber/chat-switchboard/store"
|
||||
"chat-switchboard/store"
|
||||
)
|
||||
|
||||
// SMTPConfig holds SMTP connection settings, loaded from platform_settings.
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"git.gobha.me/xcaliber/chat-switchboard/events"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/models"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/store"
|
||||
"chat-switchboard/events"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
)
|
||||
|
||||
// ── Package-level singleton ─────────────────
|
||||
@@ -103,7 +103,7 @@ func (s *Service) Notify(ctx context.Context, n *models.Notification) error {
|
||||
|
||||
if s.hub != nil {
|
||||
payload, _ := json.Marshal(n)
|
||||
s.hub.SendToUser(n.UserID, events.Event{
|
||||
s.hub.PublishToUser(n.UserID, events.Event{
|
||||
Label: "notification.new",
|
||||
Payload: payload,
|
||||
Ts: time.Now().UnixMilli(),
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"git.gobha.me/xcaliber/chat-switchboard/models"
|
||||
"chat-switchboard/models"
|
||||
)
|
||||
|
||||
// mockPrefStore implements store.NotificationPreferenceStore for testing.
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"git.gobha.me/xcaliber/chat-switchboard/events"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/models"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/store"
|
||||
"chat-switchboard/events"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/store"
|
||||
)
|
||||
|
||||
// ── Role Fallback ───────────────────────────
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"git.gobha.me/xcaliber/chat-switchboard/models"
|
||||
"chat-switchboard/models"
|
||||
)
|
||||
|
||||
// mockNotifStore implements store.NotificationStore for testing.
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"html/template"
|
||||
"strings"
|
||||
|
||||
"git.gobha.me/xcaliber/chat-switchboard/models"
|
||||
"chat-switchboard/models"
|
||||
)
|
||||
|
||||
// ── Template Data ───────────────────────────
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"git.gobha.me/xcaliber/chat-switchboard/models"
|
||||
"chat-switchboard/models"
|
||||
)
|
||||
|
||||
func TestRenderHTML_Basic(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user