fix: use default IM tenant

This commit is contained in:
richjohnrambo
2026-10-19 11:28:15 +08:00
parent 1c11c0fa82
commit 355d59813b
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ func defaultConfig() *Config {
IM: IMConfig{
BaseURL: "https://api.118im.com", HTTPAPIURL: "https://api.118im.com/v1/im",
WebSocketURL: "wss://api.118im.com/v0/channels", FileURL: "https://api.118im.com/v0/file",
TenantCode: "allrich", APIKey: "AQAAAAABAAChdu8_yk0OxZcId6FnwYNS",
TenantCode: "default", APIKey: "AQAAAAABAAChdu8_yk0OxZcId6FnwYNS",
InternalService: "olons-server", Timeout: 8 * time.Second,
},
ReadTimeout: 8 * time.Second,
+3
View File
@@ -11,6 +11,9 @@ func TestDefaultConfigUsesOlonsAdmin(t *testing.T) {
if err := cfg.validate(); err != nil {
t.Fatal(err)
}
if cfg.IM.TenantCode != "default" {
t.Fatalf("unexpected default IM tenant: %q", cfg.IM.TenantCode)
}
}
func TestConfigRejectsOtherDatabase(t *testing.T) {