mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
* fix(ws): 2 defect(s) (OC-0013, OC-0140) * fix(voice): 1 defect(s) (OC-0044) * fix(ws): 1 defect(s) (OC-0024) * fix(server): 1 defect(s) (OC-0027) * fix(ws): 1 defect(s) (OC-0028) * fix(server): 7 defect(s) (OC-0033, OC-0066, OC-0067, OC-0068, OC-0074, OC-0077, OC-0106) * fix(ws): 1 defect(s) (OC-0051) * fix(client): 1 defect(s) (OC-0053) * fix(client): 1 defect(s) (OC-0055) * fix(service): 1 defect(s) (OC-0069) * fix(voice): 1 defect(s) (OC-0072) * fix(service): 1 defect(s) (OC-0082) * fix(client): 1 defect(s) (OC-0083) * fix(plugin): 1 defect(s) (OC-0088) * fix(plugin): 4 defect(s) (OC-0104, OC-0126, OC-0127, OC-0133) * fix(admin): 1 defect(s) (OC-0110) * fix(client): 1 defect(s) (OC-0114) * fix(api): 1 defect(s) (OC-0139) * fix(client): 1 defect(s) (OC-0149) * test(server): adapt existing tests to updated OpenDM and IncrementMentionCounts signatures * style(plugin): modernize loops and goroutine spawns in race test * fix(ws): mirror the focus admission gate in the post-subscribe revalidation * fix(service): detach DM post-commit side effects from the request ctx, fail delete closed, add empty-fan-out fallback * fix(plugin): preserve enabled intent when upgrade reactivation hits a runtime-less build * chore(skills): harden bughunt-fix workflow and fold review lessons into bughunt-run/db-change * Add comprehensive documentation for task-observer skill - Introduced environments.md to outline activation setup, compaction behavior, and handoff-doc mode. - Created skill-authoring.md detailing taxonomy, licensing, confidentiality, and editing rules for skill creation. - Added weekly-review.md for a structured review process of OPEN observations, including scheduled and in-session fallback modes. * chore(go): pin toolchain go1.26.6 (stdlib CVE fixes flagged by govulncheck)
20 lines
798 B
Go
20 lines
798 B
Go
package ws
|
|
|
|
import "testing"
|
|
|
|
// dmEventOrFallback guards the degraded-fan-out shape: a DM event whose
|
|
// participant list is empty (a failed post-commit participant lookup) must
|
|
// fall back to the channel-topic broadcast instead of consuming a seq for a
|
|
// frame addressed to nobody — the topic fallback still reaches whoever has
|
|
// the DM focused.
|
|
func TestDMEventOrFallback(t *testing.T) {
|
|
dm := MessageSentDMEvent{channelID: 5}
|
|
fb := MessageSentChannelEvent{channelID: 5}
|
|
if _, ok := dmEventOrFallback(dm, fb, nil).(MessageSentChannelEvent); !ok {
|
|
t.Error("empty participant list must fall back to the channel broadcast")
|
|
}
|
|
if _, ok := dmEventOrFallback(dm, fb, []int64{1, 2}).(MessageSentDMEvent); !ok {
|
|
t.Error("a populated participant list must keep the DM-targeted event")
|
|
}
|
|
}
|