fix: allow posts to be made with empty content if an image is uploaded
fix: chats websocket message delete
This commit is contained in:
parent
d3c696026a
commit
f3b605e30e
2 changed files with 3 additions and 2 deletions
|
@ -577,13 +577,13 @@ hide_user_menu=true) }}
|
|||
}
|
||||
|
||||
const msg = JSON.parse(event.data);
|
||||
const [channel_id, data] = JSON.parse(msg.data);
|
||||
|
||||
if (
|
||||
msg.method === "Message" &&
|
||||
window.CURRENT_PAGE === 0 &&
|
||||
window.VIEWING_SINGLE
|
||||
) {
|
||||
const [channel_id, data] = JSON.parse(msg.data);
|
||||
if (channel_id !== window.CHAT_PROPS.selected_channel) {
|
||||
// message not for us... maybe send notification later
|
||||
// something like /api/v1/messages/{id}/mark_unread
|
||||
|
@ -624,6 +624,7 @@ hide_user_menu=true) }}
|
|||
socket.close();
|
||||
}
|
||||
} else if (msg.method === "Delete") {
|
||||
const data = JSON.parse(msg.data);
|
||||
if (document.getElementById(`message-${data.id}`)) {
|
||||
document
|
||||
.getElementById(`message-${data.id}`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue