Skip to content
This repository has been archived by the owner on Jul 3, 2021. It is now read-only.

Commit

Permalink
Update: Also accept 0 for sendChat delete timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
thedark1337 committed Oct 20, 2017
1 parent 484fdb2 commit c7a28ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ class PlugAPI extends EventEmitter3 {

if (obj) {
store(this)._sendEvent(PlugAPI.events.CHAT, obj.msg);
if (!Object.is(obj.timeout, undefined) && store(this)._isNumber(obj.timeout) && Number(obj.timeout) > 0) {
if (!Object.is(obj.timeout, undefined) && store(this)._isNumber(obj.timeout) && Number(obj.timeout) >= 0) {
const specificChatDeleter = (data) => {
if (Object.is(data.raw.uid, store(this)._room.getSelf().id) && Object.is(data.message.trim(), obj.msg.trim())) {
setTimeout(() => {
Expand Down

0 comments on commit c7a28ef

Please sign in to comment.