diff --git a/server/public/logo.png b/server/public/logo.png
deleted file mode 100644
index aba2c5c..0000000
Binary files a/server/public/logo.png and /dev/null differ
diff --git a/server/public/mark-light.png b/server/public/mark-light.png
new file mode 100644
index 0000000..ae0bb46
Binary files /dev/null and b/server/public/mark-light.png differ
diff --git a/server/public/share.html b/server/public/share.html
index 5ea765d..dfc9b57 100644
--- a/server/public/share.html
+++ b/server/public/share.html
@@ -67,7 +67,7 @@
-

+
Biz Connect
Secure, instant remote support — no downloads, you stay in control.
diff --git a/server/repos.js b/server/repos.js
index 2fc92dc..e97f44d 100644
--- a/server/repos.js
+++ b/server/repos.js
@@ -188,6 +188,7 @@ const messages = {
byAttachment: (attachmentId) => db.prepare('SELECT * FROM messages WHERE attachment_id=? LIMIT 1').get(attachmentId),
setPoll: (messageId, pollId) => db.prepare('UPDATE messages SET poll_id=? WHERE id=?').run(pollId, messageId),
markDelivered: (id) => db.prepare('UPDATE messages SET delivered_at=? WHERE id=? AND delivered_at IS NULL').run(now(), id),
+ editBody: (id, body) => db.prepare('UPDATE messages SET body=?, edited_at=? WHERE id=?').run(body, now(), id),
// Delete-for-everyone: clear the content but keep the row (renders as a placeholder).
markDeleted: (id) => db.prepare("UPDATE messages SET deleted=1, body='', attachment_id=NULL, poll_id=NULL WHERE id=?").run(id),
// Shared media/files in a conversation (group) or DM — newest first.
diff --git a/server/routes.js b/server/routes.js
index 0466ea6..133536b 100644
--- a/server/routes.js
+++ b/server/routes.js
@@ -1282,6 +1282,26 @@ route('POST', '/api/messages/delete', async (req, res) => {
else { try { CHAT.pushToUser(m.recipient_id, evt); } catch (_) {} try { CHAT.pushToUser(u.id, evt); } catch (_) {} }
json(res, 200, { ok: true });
});
+// Edit a message (sender only, text only) — updates the body + marks it edited, and pushes the
+// change live to the other side / other tabs (mirrors the delete broadcast).
+route('POST', '/api/messages/edit', async (req, res) => {
+ const u = currentUser(req);
+ if (!u) return json(res, 401, { error: 'unauthorized' });
+ const { id, body } = await readBody(req);
+ if (!id || typeof body !== 'string') return json(res, 400, { error: 'id and body required' });
+ const text = body.trim();
+ if (!text) return json(res, 400, { error: 'message cannot be empty' });
+ const m = R.messages.byId(id);
+ if (!m || m.team_id !== u.team_id) return json(res, 404, { error: 'not found' });
+ if (m.sender_id !== u.id) return json(res, 403, { error: 'you can only edit your own messages' });
+ if (m.deleted) return json(res, 400, { error: 'cannot edit a deleted message' });
+ R.messages.editBody(id, text);
+ const edited = R.messages.byId(id);
+ const evt = { type: 'chat-edited', id, body: text, edited_at: edited.edited_at, conversation_id: m.conversation_id || null };
+ if (m.conversation_id) { for (const mid of R.conversations.members(m.conversation_id)) { try { CHAT.pushToUser(mid, evt); } catch (_) {} } }
+ else { try { CHAT.pushToUser(m.recipient_id, evt); } catch (_) {} try { CHAT.pushToUser(u.id, evt); } catch (_) {} }
+ json(res, 200, { ok: true, edited_at: edited.edited_at });
+});
// Favourite/unfavourite a conversation (per user). target = 'dm:
' or 'group:'.
route('POST', '/api/favorites', async (req, res) => {
const u = currentUser(req);