fix: mark process.nextTick async callbacks with void operator
Fixes @typescript-eslint/no-floating-promises error by explicitly marking fire-and-forget process.nextTick async callbacks with void. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1869,7 +1869,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
|||||||
|
|
||||||
// Emit own event for album root if configured
|
// Emit own event for album root if configured
|
||||||
if (config.emitOwnEvents) {
|
if (config.emitOwnEvents) {
|
||||||
process.nextTick(async () => {
|
void process.nextTick(async () => {
|
||||||
let mutexKey = albumRootMsg.key.remoteJid
|
let mutexKey = albumRootMsg.key.remoteJid
|
||||||
if (!mutexKey) {
|
if (!mutexKey) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
@@ -1975,7 +1975,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
|||||||
|
|
||||||
// Emit own event if configured
|
// Emit own event if configured
|
||||||
if (config.emitOwnEvents) {
|
if (config.emitOwnEvents) {
|
||||||
process.nextTick(async () => {
|
void process.nextTick(async () => {
|
||||||
let mutexKey = mediaMsg.key.remoteJid
|
let mutexKey = mediaMsg.key.remoteJid
|
||||||
if (!mutexKey) {
|
if (!mutexKey) {
|
||||||
logger.warn({ msgId: mediaMsg.key.id }, 'Missing remoteJid in mediaMsg, using msg.key.id as fallback')
|
logger.warn({ msgId: mediaMsg.key.id }, 'Missing remoteJid in mediaMsg, using msg.key.id as fallback')
|
||||||
@@ -2139,7 +2139,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
|||||||
}) as WAMessage
|
}) as WAMessage
|
||||||
|
|
||||||
if (config.emitOwnEvents) {
|
if (config.emitOwnEvents) {
|
||||||
process.nextTick(async () => {
|
void process.nextTick(async () => {
|
||||||
const mutexKey = fullMsg.key.remoteJid || fullMsg.key.id || 'unknown'
|
const mutexKey = fullMsg.key.remoteJid || fullMsg.key.id || 'unknown'
|
||||||
await messageMutex.mutex(mutexKey, () => upsertMessage(fullMsg, 'append'))
|
await messageMutex.mutex(mutexKey, () => upsertMessage(fullMsg, 'append'))
|
||||||
})
|
})
|
||||||
@@ -2228,7 +2228,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
|||||||
additionalNodes
|
additionalNodes
|
||||||
})
|
})
|
||||||
if (config.emitOwnEvents) {
|
if (config.emitOwnEvents) {
|
||||||
process.nextTick(async () => {
|
void process.nextTick(async () => {
|
||||||
let mutexKey = fullMsg.key.remoteJid
|
let mutexKey = fullMsg.key.remoteJid
|
||||||
if (!mutexKey) {
|
if (!mutexKey) {
|
||||||
logger.warn({ msgId: fullMsg.key.id }, 'Missing remoteJid in fullMsg, using msg.key.id as fallback')
|
logger.warn({ msgId: fullMsg.key.id }, 'Missing remoteJid in fullMsg, using msg.key.id as fallback')
|
||||||
|
|||||||
Reference in New Issue
Block a user