Skip to content

Commit 59077cb

Browse files
fix bad buffer. remove unnecessary async
1 parent 1c54338 commit 59077cb

File tree

1 file changed

+4
-3
lines changed
  • src/extensions/message-handlers/auto-optin

1 file changed

+4
-3
lines changed

src/extensions/message-handlers/auto-optin/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ export const available = organization => {
3232
}
3333
}
3434

35-
export const preMessageSave = async ({ messageToSave, organization }) => {
35+
export const preMessageSave = ({ messageToSave, organization }) => {
3636
if (messageToSave.is_from_contact) {
3737
const config = Buffer.from(
3838
getConfig("AUTO_OPTIN_REGEX_LIST_BASE64", organization) ||
39-
DEFAULT_AUTO_OPTIN_REGEX_LIST_BASE64
40-
);
39+
DEFAULT_AUTO_OPTIN_REGEX_LIST_BASE64,
40+
"base64"
41+
).toString();
4142
const regexList = JSON.parse(config || "[]");
4243
const matches = regexList.filter(matcher => {
4344
const re = new RegExp(matcher.regex); // Want case sensitivity, probably?

0 commit comments

Comments
 (0)