removed is_disabled on msg_vaild. Fix
This commit is contained in:
parent
dca731c18e
commit
d35a3e8770
@ -34,20 +34,18 @@ function msg_valid(msg)
|
|||||||
print("Not valid, msg from us")
|
print("Not valid, msg from us")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Before bot was started
|
||||||
if msg.date < now then
|
if msg.date < now then
|
||||||
print("Not valid, old msg")
|
print("Not valid, old msg")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
if msg.unread == 0 then
|
if msg.unread == 0 then
|
||||||
print("Not valid, readed")
|
print("Not valid, readed")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
if is_disabled(msg) then
|
|
||||||
print("Disabled channel")
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ local function disable_channel( receiver )
|
|||||||
_config.disabled_channels = {}
|
_config.disabled_channels = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
_config.disabled_channels[receiver] = false
|
_config.disabled_channels[receiver] = true
|
||||||
|
|
||||||
save_config()
|
save_config()
|
||||||
return "Channel disabled"
|
return "Channel disabled"
|
||||||
|
Reference in New Issue
Block a user