Skip to content

Commit

Permalink
Fix welcome.lua:137: attempt to index local 'ok' (a nil value)
Browse files Browse the repository at this point in the history
Signed-off-by: Yan Minari <yangm97@gmail.com>
  • Loading branch information
yangm97 committed Dec 17, 2018
1 parent c5254eb commit e4d46f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/groupbutler/plugins/welcome.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ local function send_welcome(self, msg)
return
end

if db:get_chat_setting(msg.chat.id, "Weldelchain") then
if ok and db:get_chat_setting(msg.chat.id, "Weldelchain") then
local key = ('chat:%d:lastwelcome'):format(msg.chat.id) -- get the id of the last sent welcome message
local message_id = red:get(key)
if message_id ~= null then
Expand Down

0 comments on commit e4d46f7

Please sign in to comment.