mirror of
https://github.com/pieartsy/PluralFlux.git
synced 2026-04-16 17:45:28 +10:00
removed some overzealous error handling
This commit is contained in:
@@ -55,7 +55,8 @@ msgh.parseProxyTags = async function (authorId, attachment, content){
|
||||
const removePrefix = new RegExp("^" + splitProxy[0]);
|
||||
const removeSuffix = new RegExp(splitProxy[1] + "$");
|
||||
proxyMessage.message = content.replace(removePrefix, "").replace(removeSuffix, "");
|
||||
if (proxyMessage.message.length <= splitProxy[0].length + splitProxy[1].length && !attachment) throw new Error(enums.err.NO_MESSAGE_SENT_WITH_PROXY);
|
||||
|
||||
if (proxyMessage.message.length === 0 && !attachment) throw new Error(enums.err.NO_MESSAGE_SENT_WITH_PROXY);
|
||||
}
|
||||
})
|
||||
return proxyMessage;
|
||||
|
||||
Reference in New Issue
Block a user