Signal send/receive fixes
This commit is contained in:
parent
c527403868
commit
5e2475848e
3 changed files with 7 additions and 5 deletions
|
|
@ -15,11 +15,13 @@ const fetchSignalMessagesTask = async (): Promise<void> => {
|
|||
const messages = await messagesClient.v1ReceiveNumberGet({ number });
|
||||
|
||||
for (const msg of messages) {
|
||||
console.log(msg);
|
||||
const { envelope } = msg as any;
|
||||
const { source, sourceUuid, dataMessage } = envelope;
|
||||
const messageId = sourceUuid;
|
||||
const message = dataMessage?.message;
|
||||
const timestamp = new Date(dataMessage?.timestamp);
|
||||
const rawTimestamp = dataMessage?.timestamp;
|
||||
const timestamp = new Date(rawTimestamp);
|
||||
const messageId = `${sourceUuid}-${rawTimestamp}`;
|
||||
const attachment = undefined;
|
||||
const mimeType = undefined;
|
||||
const filename = undefined;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class Channel
|
|||
# )
|
||||
#
|
||||
|
||||
def send(options, article, _notification = false)
|
||||
def deliver(options, article, _notification = false)
|
||||
# return if we run import mode
|
||||
return if Setting.get('import_mode')
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ class Channel::Driver::CdrWhatsapp
|
|||
# )
|
||||
#
|
||||
|
||||
def send(options, article, _notification = false)
|
||||
# return if we run import mode
|
||||
def deliver(options, article, _notification = false)
|
||||
# return if we run import mode
|
||||
return if Setting.get('import_mode')
|
||||
|
||||
options = check_external_credential(options)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue