Add id field to announcements and hide previously closed announcements
This commit is contained in:
parent
ff3ececc36
commit
964feb7243
4 changed files with 17 additions and 2 deletions
|
|
@ -4,6 +4,7 @@ var db = require("./database");
|
|||
var util = require("./utilities");
|
||||
var Config = require("./config");
|
||||
var Server = require("./server");
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
function eventUsername(user) {
|
||||
return user.getName() + "@" + user.realip;
|
||||
|
|
@ -13,6 +14,7 @@ function handleAnnounce(user, data) {
|
|||
var sv = Server.getServer();
|
||||
|
||||
sv.announce({
|
||||
id: uuidv4(),
|
||||
title: data.title,
|
||||
text: data.content,
|
||||
from: user.getName()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue