From b6eb2c0da4e653c6fdd278bcbdcd55ec376cd481 Mon Sep 17 00:00:00 2001 From: Keuin Date: Sun, 2 Jul 2023 14:48:47 +0800 Subject: Refactor: move RoomId type to the correct package. Type all room ID usages. --- danmaku/dmpkg/auth.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'danmaku/dmpkg') diff --git a/danmaku/dmpkg/auth.go b/danmaku/dmpkg/auth.go index 5caf868..bb66f1d 100644 --- a/danmaku/dmpkg/auth.go +++ b/danmaku/dmpkg/auth.go @@ -8,23 +8,23 @@ package dmpkg import ( "encoding/json" "fmt" - "github.com/keuin/slbr/common" + "github.com/keuin/slbr/bilibili" ) type authInfo struct { - UID uint64 `json:"uid"` - RoomId uint64 `json:"roomid"` - ProtoVer int `json:"protover"` - Platform string `json:"platform"` - Type int `json:"type"` - Key string `json:"key"` + UID uint64 `json:"uid"` + RoomId bilibili.RoomId `json:"roomid"` + ProtoVer int `json:"protover"` + Platform string `json:"platform"` + Type int `json:"type"` + Key string `json:"key"` } // NewAuth creates a new authentication exchange. -func NewAuth(protocol ProtocolVer, roomId common.RoomId, authKey string) (exc DanmakuExchange) { +func NewAuth(protocol ProtocolVer, roomId bilibili.RoomId, authKey string) (exc DanmakuExchange) { exc, _ = NewPlainExchange(OpConnect, authInfo{ UID: UidGuest, - RoomId: uint64(roomId), + RoomId: roomId, ProtoVer: int(protocol), Platform: PlatformWeb, Type: AuthTypeDefault, -- cgit v1.2.3