Shared notes now share updated times

* Updating a shared note, updates the information for other shared users
* Unread shared notes now have a badge
* Updated shared notes now have a badge
* Shared notes can not be reshared, sharer username appears in interface to stop sharing
fixes #15
This commit is contained in:
Max G committed 2020-02-24 06:01:14 +00:00
1 parent ef0a6a44c9
commit 8f5d8049d0
4 files changed
+43 -23

No files matched your search

+3 -2
View File
@@ -211,12 +211,13 @@ Tag.latest = (userId, noteId) => {
.query(`SELECT tag.text FROM note_tag
JOIN tag ON note_tag.tag_id = tag.id
JOIN note ON note_tag.note_id = note.id
JOIN note_raw_text ON (note_raw_text.id = note.note_raw_text_id)
WHERE note_tag.user_id = ?
AND note_tag.tag_id NOT IN (
SELECT note_tag.tag_id FROM note_tag WHERE note_tag.note_id = ?
)
GROUP BY tag.text, note.updated
ORDER BY note.updated DESC
GROUP BY tag.text, note_raw_text.updated
ORDER BY note_raw_text.updated DESC
LIMIT 8;`, [userId, noteId])
.then((rows, fields) => {
resolve(rows[0]) //Return found tags