chore: remove unused dmChannelClosePayload and buildDMChannelClose

Fixes golangci-lint unused warnings that would fail CI.
This commit is contained in:
jevb
2026-03-28 18:43:23 +01:00
parent 032456758e
commit 9ef6b3354c
-13
View File
@@ -151,11 +151,6 @@ type dmChannelOpenPayload struct {
Recipient dmUserPayload `json:"recipient"`
}
// dmChannelClosePayload is sent when a user closes a DM.
type dmChannelClosePayload struct {
ChannelID int64 `json:"channel_id"`
}
// dmUserPayload is the public-facing shape for a DM participant in WS events.
type dmUserPayload struct {
ID int64 `json:"id"`
@@ -453,14 +448,6 @@ func buildDMChannelOpen(channelID int64, recipient *db.User) []byte {
})
}
// buildDMChannelClose constructs a dm_channel_close event sent to a user.
func buildDMChannelClose(channelID int64) []byte {
return buildJSON(wsMsg{
Type: "dm_channel_close",
Payload: dmChannelClosePayload{ChannelID: channelID},
})
}
// buildServerRestartMsg constructs a server_restart broadcast.
func buildServerRestartMsg(reason string, delaySeconds int) []byte {
return buildJSON(wsMsg{