修正从服务器获取用户信息消息格式错误
This commit is contained in:
@@ -141,7 +141,7 @@ function NET.getUserInfo(uid)
|
||||
WS.send("user",JSON.encode{
|
||||
action=1,
|
||||
data={
|
||||
id=uid,
|
||||
uid=uid,
|
||||
hash=hash,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -36,7 +36,7 @@ local db=setmetatable({},{__index=function(self,k)
|
||||
{
|
||||
username="[X]",
|
||||
motto="Techmino haowan",
|
||||
hash="",
|
||||
hash="_",
|
||||
new=false,
|
||||
}
|
||||
rawset(self,k,d)
|
||||
@@ -61,7 +61,6 @@ function USERS.updateUserData(data)
|
||||
fs.write("cache/"..data.hash,love.data.decode("string","base64",data.avatar:sub(data.avatar:find","+1)))
|
||||
db_img[uid]=loadAvatar("cache/"..data.hash)
|
||||
db[uid].hash=type(data.hash)=="string"and #data.hash>0 and data.hash
|
||||
db[uid].new=true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user