1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

fix: uin extract

This commit is contained in:
源文雨 2022-11-10 16:31:14 +08:00
parent 1de1deb059
commit a6613d88bf
2 changed files with 6 additions and 3 deletions

3
.gitignore vendored
View File

@ -12,3 +12,6 @@ internal/btree/*.db
# binary builds
go-cqhttp
# macos
.DS_Store

View File

@ -155,7 +155,7 @@ func (s *database) GetGroupMessageByGlobalID(id int32) (*db.StoredGroupMessage,
if err == nil {
var uin UinInfo
s.RLock()
err = s.db.Find(Sqlite3UinInfoTableName, &attr, "WHERE Uin="+strconv.FormatInt(attr.SenderUin, 10))
err = s.db.Find(Sqlite3UinInfoTableName, &uin, "WHERE Uin="+strconv.FormatInt(attr.SenderUin, 10))
s.RUnlock()
if err == nil {
ret.Attribute = &db.StoredMessageAttribute{
@ -207,7 +207,7 @@ func (s *database) GetPrivateMessageByGlobalID(id int32) (*db.StoredPrivateMessa
if err == nil {
var uin UinInfo
s.RLock()
err = s.db.Find(Sqlite3UinInfoTableName, &attr, "WHERE Uin="+strconv.FormatInt(attr.SenderUin, 10))
err = s.db.Find(Sqlite3UinInfoTableName, &uin, "WHERE Uin="+strconv.FormatInt(attr.SenderUin, 10))
s.RUnlock()
if err == nil {
ret.Attribute = &db.StoredMessageAttribute{
@ -264,7 +264,7 @@ func (s *database) GetGuildChannelMessageByID(id string) (*db.StoredGuildChannel
if err == nil {
var tiny TinyInfo
s.RLock()
err = s.db.Find(Sqlite3TinyInfoTableName, &attr, "WHERE ID="+strconv.FormatInt(attr.SenderTinyID, 10))
err = s.db.Find(Sqlite3TinyInfoTableName, &tiny, "WHERE ID="+strconv.FormatInt(attr.SenderTinyID, 10))
s.RUnlock()
if err == nil {
ret.Attribute = &db.StoredGuildMessageAttribute{