# Meeting 5 **What have we done last week** * Made some functions async that werent yet in chat-server * login readline made synchronous because of masked input and array select possibilities * websocket made secure * login tests extended for full coverage * edge case tests for all database functions * message lookup created * Wrote a few more huffman functions **Todays work** - [ ] MERGEE - [ ] Resolve merge conflicts - [ ] Fix prettier - [ ] linter error - [ ] fix pipeline - [ ] verslag **On startup** * initializeDatabase() * removeInactiveUsers() **On shutdown** * saveToFile() **End meet** conclusion: as it turns out there exists a lot of conflicts betweet the teams. We hadn't merged anything to main yet. Doesn't seem like a great idea to all merge when ready, merge in waves. Most code relies on the database. This has to finish first. They try to get this done tonight. Then the login and channel functionality will pull that, merge to main when all problems are resolved. Finally the command line interface will be fixed. all of this should be finished by thursday. **Database Explained** Database changes: Database functions are now synchronous, no more need to set up empty db. Only save to file on shutdown and load from file on startup Files: channel.mts, database.mts, message.mts, user.mts --> hold the types. config.mts --> used to check and update database path (default = 'src/database/database.JSON') getPath(): string changePath(newPath: string) databaseCleanup.mts --> removeInactiveUsers() --> on startup db-functions.mts --> initializeDataBase() --> On startup saveToFile() --> On shutdown addUser(user: User) --> timestamp-strings must be formatted like this: '2023-11-19T00:34:56Z' addChannel(channel: Channel) --> addMessage(message: Message) --> timestamp-strings must be formatted like this: '2023-11-19T00:34:56Z', message_ID gets updated automatically. Some getters UnlinkUserAndChannel(userEmail: string, channelName: string) changeCurrentChannel(email: string, channelName: string) linkChanneltoUser(channel_name: string, email: string) changeLastSeen(email: string, newLastSeen: string) fileIO.mts messageLookup.mts --> getMessageLookup(channelName: string, time: string): Message[] test.JSON, test2.JSON, wrongtest.JSON --> for testing fileIO, do not change!