minor changes
This commit is contained in:
@@ -57,7 +57,7 @@ export async function getMessages(
|
||||
|
||||
return response.data;
|
||||
} catch (e) {
|
||||
console.error('Failed to get messages: ', e);
|
||||
//console.error('Failed to get messages: ', e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ function MessagesArea({
|
||||
);
|
||||
console.log('changed status to false for: ', msg.sender);
|
||||
}
|
||||
if (msg.sender == currentContact) {
|
||||
if (msg.sender == currentContact && msg.sender !== username) {
|
||||
messageHandler(msg);
|
||||
}
|
||||
});
|
||||
@@ -126,14 +126,14 @@ function MessagesArea({
|
||||
}`}
|
||||
key={msg.message_id || msg.tempId}
|
||||
>
|
||||
{msg.sender}: {msg.message}
|
||||
{msg.message_id} {msg.tempId} {msg.sender}: {msg.message}
|
||||
{msg.attachment_url ? (
|
||||
<div className="mt-2">
|
||||
{msg.attachment_url.match(/\.(jpg|jpeg|png|gif|bmp|webp)$/i) ? (
|
||||
<img
|
||||
src={msg.attachment_url}
|
||||
alt="attachment"
|
||||
className="max-w-full max-h-40 object-contain rounded"
|
||||
className="max-w-full max-h-64 object-contain rounded"
|
||||
/>
|
||||
) : (
|
||||
<FileBox url={msg.attachment_url} />
|
||||
|
||||
Reference in New Issue
Block a user