mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
commit
10bac416ce
@ -343,11 +343,12 @@ const (
|
||||
Administrator MemberPermission = 2
|
||||
Member MemberPermission = 3
|
||||
|
||||
Unset ClientProtocol = 0
|
||||
AndroidPhone ClientProtocol = 1
|
||||
IPad ClientProtocol = 2
|
||||
AndroidWatch ClientProtocol = 3
|
||||
MacOS ClientProtocol = 4
|
||||
QiDian ClientProtocol = 5
|
||||
AndroidWatch ClientProtocol = 2
|
||||
MacOS ClientProtocol = 3
|
||||
QiDian ClientProtocol = 4
|
||||
IPad ClientProtocol = 5
|
||||
)
|
||||
|
||||
func (r *UserJoinGroupRequest) Accept() {
|
||||
|
@ -301,8 +301,6 @@ func (info *DeviceInfo) ToJson() []byte {
|
||||
VendorOSName: string(info.VendorOSName),
|
||||
Protocol: func() int {
|
||||
switch info.Protocol {
|
||||
case IPad:
|
||||
return 0
|
||||
case AndroidPhone:
|
||||
return 1
|
||||
case AndroidWatch:
|
||||
@ -311,6 +309,8 @@ func (info *DeviceInfo) ToJson() []byte {
|
||||
return 3
|
||||
case QiDian:
|
||||
return 4
|
||||
case IPad:
|
||||
return 5
|
||||
}
|
||||
return 0
|
||||
}(),
|
||||
@ -375,6 +375,8 @@ func (info *DeviceInfo) ReadJson(d []byte) error {
|
||||
info.Protocol = MacOS
|
||||
case 4:
|
||||
info.Protocol = QiDian
|
||||
case 5:
|
||||
info.Protocol = IPad
|
||||
default:
|
||||
info.Protocol = IPad
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user