Whatsapp service updates
This commit is contained in:
parent
e22a8e8d98
commit
3da103c010
16 changed files with 151 additions and 36 deletions
|
|
@ -1,12 +1,22 @@
|
|||
// import { db, getWorkerUtils } from "bridge-common";
|
||||
import { db, getWorkerUtils } from "bridge-common";
|
||||
|
||||
interface ReceiveWhatsappMessageTaskOptions {
|
||||
token;
|
||||
message: any;
|
||||
}
|
||||
|
||||
const receiveWhatsappMessageTask = async ({
|
||||
token,
|
||||
message,
|
||||
}: ReceiveWhatsappMessageTaskOptions): Promise<void> => {};
|
||||
}: ReceiveWhatsappMessageTaskOptions): Promise<void> => {
|
||||
const bot = await db
|
||||
.selectFrom("WhatsappBot")
|
||||
.selectAll()
|
||||
.where((eb) => eb.or([eb("token", "=", token), eb("id", "=", token)]))
|
||||
.executeTakeFirstOrThrow();
|
||||
|
||||
console.log(bot);
|
||||
};
|
||||
|
||||
export default receiveWhatsappMessageTask;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue