Enhance chat and broadcast functionality with debug logging for image messages. Update chat store to log received messages and their details, and modify broadcast to log image sending events. Increase maxHttpBufferSize for handling larger images in Socket.IO.
This commit is contained in:
@@ -224,15 +224,25 @@ export const useChatStore = defineStore('chat', () => {
|
||||
updateSearchResults();
|
||||
break;
|
||||
case 'message':
|
||||
// Debug-Logging für empfangene Nachrichten
|
||||
if (data.isImage) {
|
||||
console.log('[Bild empfangen] Von:', data.from, 'Typ:', data.imageType, 'Größe:', data.message ? data.message.length : 0, 'Zeichen');
|
||||
}
|
||||
|
||||
if (currentConversation.value === data.from) {
|
||||
messages.value.push({
|
||||
const newMessage = {
|
||||
from: data.from,
|
||||
message: data.message,
|
||||
timestamp: data.timestamp,
|
||||
self: false,
|
||||
isImage: data.isImage || false,
|
||||
imageType: data.imageType || null
|
||||
});
|
||||
};
|
||||
|
||||
console.log('[Nachricht hinzugefügt]', newMessage);
|
||||
messages.value.push(newMessage);
|
||||
} else {
|
||||
console.log('[Nachricht ignoriert] Aktuelle Konversation:', currentConversation.value, 'Nachricht von:', data.from);
|
||||
}
|
||||
// Timeout zurücksetzen bei empfangener Nachricht
|
||||
resetTimeoutTimer();
|
||||
|
||||
Reference in New Issue
Block a user