Mercurial Hosting > chat
comparison src/add_post.js.luan @ 53:9298b04607ae
add unread
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Mon, 03 Mar 2025 19:39:30 -0700 |
| parents | 7ea33179592a |
| children | d4d154b404f8 |
comparison
equal
deleted
inserted
replaced
| 52:c3fabb21b6c4 | 53:9298b04607ae |
|---|---|
| 37 } | 37 } |
| 38 post.save() | 38 post.save() |
| 39 chat.updated = now | 39 chat.updated = now |
| 40 chat.save() | 40 chat.save() |
| 41 end ) | 41 end ) |
| 42 chat.read(user) | |
| 42 Notify.add(chat) | 43 Notify.add(chat) |
| 43 local html = `post_html(post)` | 44 local html = `post_html(post)` |
| 44 local js = "added("..json_string(html)..")" | 45 local js = "added("..json_string(html)..")" |
| 45 chat.http_push(js) | 46 chat.http_push(js) |
| 46 js = "getChats('"..chat.id.."',"..now..")" | 47 js = "getChats('"..chat.id.."',"..now..")" |
