mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
add missing username for blog notifications (#5422)
The notifications backend it worked fine, but the frontend was missing the username variable to be in able to display the 'New' badge correctly
This commit is contained in:
parent
7d51eb47f7
commit
24f054f009
6 changed files with 39 additions and 35 deletions
|
|
@ -71,12 +71,14 @@ function blog_utils.updatePostState(blogNotificationId, username)
|
|||
|
||||
for _, p in pairs(posts) do
|
||||
if (p.id == blogNotificationId) then
|
||||
if (p.users_read == nil) then p.users_read = {} end
|
||||
p.users_read[username] = true
|
||||
success = true
|
||||
if (p.users_read == nil) then p.users_read = {} end
|
||||
p.users_read[username] = true
|
||||
success = true
|
||||
end
|
||||
end
|
||||
|
||||
tprint(posts)
|
||||
|
||||
ntop.setPref(BLOG_FEED_KEY, json.encode(posts))
|
||||
|
||||
return (success)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue