mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-20 04:12:23 -06:00
fix: sentry version
This commit is contained in:
@@ -8,6 +8,7 @@ import { Events, wa } from '@api/types/wa.types';
|
||||
import { Chatwoot, ConfigService, Openai } from '@config/env.config';
|
||||
import { BadRequestException, InternalServerErrorException } from '@exceptions';
|
||||
import EventEmitter2 from 'eventemitter2';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
export class EvolutionStartupService extends ChannelStartupService {
|
||||
constructor(
|
||||
@@ -92,7 +93,7 @@ export class EvolutionStartupService extends ChannelStartupService {
|
||||
|
||||
if (received.message) {
|
||||
const key = {
|
||||
id: received.key.id,
|
||||
id: received.key.id || v4(),
|
||||
remoteJid: received.key.remoteJid,
|
||||
fromMe: received.key.fromMe,
|
||||
};
|
||||
@@ -162,7 +163,7 @@ export class EvolutionStartupService extends ChannelStartupService {
|
||||
await this.updateContact({
|
||||
remoteJid: messageRaw.key.remoteJid,
|
||||
pushName: messageRaw.pushName,
|
||||
profilePicUrl: null,
|
||||
profilePicUrl: received.profilePicUrl,
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -268,8 +269,10 @@ export class EvolutionStartupService extends ChannelStartupService {
|
||||
webhookUrl = options.webhookUrl;
|
||||
}
|
||||
|
||||
const messageId = v4();
|
||||
|
||||
const messageRaw: any = {
|
||||
key: { fromMe: true, id: 'ID', remoteJid: number },
|
||||
key: { fromMe: true, id: messageId, remoteJid: number },
|
||||
message: {
|
||||
...message,
|
||||
quoted,
|
||||
|
||||
@@ -7,6 +7,7 @@ import { onUnexpectedError } from '@config/error.config';
|
||||
import { Logger } from '@config/logger.config';
|
||||
import { ROOT_DIR } from '@config/path.config';
|
||||
import * as Sentry from '@sentry/node';
|
||||
import { nodeProfilingIntegration } from '@sentry/profiling-node';
|
||||
import { ServerUP } from '@utils/server-up';
|
||||
import axios from 'axios';
|
||||
import compression from 'compression';
|
||||
@@ -29,10 +30,11 @@ async function bootstrap() {
|
||||
dsn: dsn,
|
||||
environment: process.env.NODE_ENV || 'development',
|
||||
tracesSampleRate: 1.0,
|
||||
integrations: [nodeProfilingIntegration()],
|
||||
profilesSampleRate: 1.0,
|
||||
});
|
||||
app.use(Sentry.Handlers.requestHandler());
|
||||
app.use(Sentry.Handlers.tracingHandler());
|
||||
app.use(Sentry.Handlers.errorHandler());
|
||||
|
||||
Sentry.setupExpressErrorHandler(app);
|
||||
}
|
||||
|
||||
let providerFiles: ProviderFiles = null;
|
||||
|
||||
Reference in New Issue
Block a user