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
|
Administrator MemberPermission = 2
|
||||||
Member MemberPermission = 3
|
Member MemberPermission = 3
|
||||||
|
|
||||||
|
Unset ClientProtocol = 0
|
||||||
AndroidPhone ClientProtocol = 1
|
AndroidPhone ClientProtocol = 1
|
||||||
IPad ClientProtocol = 2
|
AndroidWatch ClientProtocol = 2
|
||||||
AndroidWatch ClientProtocol = 3
|
MacOS ClientProtocol = 3
|
||||||
MacOS ClientProtocol = 4
|
QiDian ClientProtocol = 4
|
||||||
QiDian ClientProtocol = 5
|
IPad ClientProtocol = 5
|
||||||
)
|
)
|
||||||
|
|
||||||
func (r *UserJoinGroupRequest) Accept() {
|
func (r *UserJoinGroupRequest) Accept() {
|
||||||
|
@ -301,8 +301,6 @@ func (info *DeviceInfo) ToJson() []byte {
|
|||||||
VendorOSName: string(info.VendorOSName),
|
VendorOSName: string(info.VendorOSName),
|
||||||
Protocol: func() int {
|
Protocol: func() int {
|
||||||
switch info.Protocol {
|
switch info.Protocol {
|
||||||
case IPad:
|
|
||||||
return 0
|
|
||||||
case AndroidPhone:
|
case AndroidPhone:
|
||||||
return 1
|
return 1
|
||||||
case AndroidWatch:
|
case AndroidWatch:
|
||||||
@ -311,6 +309,8 @@ func (info *DeviceInfo) ToJson() []byte {
|
|||||||
return 3
|
return 3
|
||||||
case QiDian:
|
case QiDian:
|
||||||
return 4
|
return 4
|
||||||
|
case IPad:
|
||||||
|
return 5
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}(),
|
}(),
|
||||||
@ -375,6 +375,8 @@ func (info *DeviceInfo) ReadJson(d []byte) error {
|
|||||||
info.Protocol = MacOS
|
info.Protocol = MacOS
|
||||||
case 4:
|
case 4:
|
||||||
info.Protocol = QiDian
|
info.Protocol = QiDian
|
||||||
|
case 5:
|
||||||
|
info.Protocol = IPad
|
||||||
default:
|
default:
|
||||||
info.Protocol = IPad
|
info.Protocol = IPad
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user