Skip to content

Commit

Permalink
fix cleaner text field name
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Aug 29, 2022
1 parent 095431b commit 10cf9a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/cleaner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ end)

beerchat.register_callback('on_http_receive', function(msg_data)
-- Trim spaces and newlines, add ">" to mark newlines in incoming message
local msg = msg_data.message
local msg = msg_data.text
:gsub('%s+$','') -- Remove trailing space
:gsub('<:[%w_]+:%d+>','') -- Remove long emoji codes
:gsub('(%s)%s+','%1') -- Trim all whitespace
Expand All @@ -14,5 +14,5 @@ beerchat.register_callback('on_http_receive', function(msg_data)
-- Throw away messages that do not contain any words after cleanup
return false
end
msg_data.message = msg
msg_data.text = msg
end)

0 comments on commit 10cf9a8

Please sign in to comment.