Stats are private by Chat

This commit is contained in:
yago
2014-12-14 21:28:32 +01:00
parent fe05645a39
commit 5bbf754d73
3 changed files with 31 additions and 20 deletions

View File

@ -1,3 +1,19 @@
function get_receiver(msg)
if msg.to.type == 'user' then
return 'user#id'..msg.from.id
end
if msg.to.type == 'chat' then
return 'chat#id'..msg.to.id
end
end
function is_chat_msg( msg )
if msg.to.type == 'chat' then
return true
end
return false
end
function string.random(length)
math.randomseed(os.time())
local str = "";