mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
fix AtAll.
This commit is contained in:
parent
414c770818
commit
5a012f0cce
@ -86,6 +86,10 @@ func NewAt(target int64, display ...string) *AtElement {
|
||||
}
|
||||
}
|
||||
|
||||
func AtAll() *AtElement {
|
||||
return NewAt(0)
|
||||
}
|
||||
|
||||
func (e *TextElement) Type() ElementType {
|
||||
return Text
|
||||
}
|
||||
|
@ -119,7 +119,12 @@ func ToProtoElems(elems []IMessageElement) (r []*msg.Elem) {
|
||||
w.WriteUInt16(1)
|
||||
w.WriteUInt16(0)
|
||||
w.WriteUInt16(uint16(len(e.Display)))
|
||||
w.WriteByte(0)
|
||||
w.WriteByte(func() byte {
|
||||
if e.Target == 0 {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
}())
|
||||
w.WriteUInt32(uint32(e.Target))
|
||||
w.WriteUInt16(0)
|
||||
}),
|
||||
|
Loading…
x
Reference in New Issue
Block a user