A real-time privacy-first social media platform leveraging feature-rich direct messaging text channels. Built as part of the course project for COSC 310 at UBC.
5
stars
1
forks
source link
Completed Revised New Text Channel Modal to Facilitate the Transition from Group Chats to Text Channels #206
added client-side validation for the case where the user clicks on "Create text channel" without entering any information or leaving either the channel name or the channel members input empty
modified the update-message-history endpoint to only update message history for existing chats and not also create a new chat if one does not already exist (now we are guaranteed to have an existing chat as you can only get there via the Plus icon).
fixed all broken Jest tests under the __tests__ directory (took way too long)
added 2 tests that simulate a) the front-end call to the backend API that handles chat creation and b) the internal processes that happen within the backend API
ensured synchronization between the member list and admin list input boxes such that deleting a user from the member list also deletes them from the admin list
removed two outdated test cases
moved the generateHash function to a utility file in the application directory called utility.ts
modifiedMessagingInterface to reflect the migration of the hashing function to utility.ts
Visual Summary of Changes
All tests passing (including those that are not specific to this pull request)
Valid inputs
Attempting to add a user as admin without adding them as a member
(Client-side validation): Attempting to submit the form without filling out anything
(Client-side validation): Attempting to submit the form without filling out a particular required field
Notification upon created text channel
MongoDB synchronization
(Client-side validation): Attempting to create a text channel that already exists (same name + members)
Known Issues
Starting a chat by clicking on a friend and having the privacy toggle off will likely cause a runtime error as we need to be running a query upon clicking a user to facilitate DMs.
Summary of Changes
added
a channel name input fieldadded
a member list comboboxadded
client-side validation for the case where the user clicks on "Create text channel" without entering any information or leaving either the channel name or the channel members input emptymodified
theupdate-message-history
endpoint to only update message history for existing chats and not also create a new chat if one does not already exist (now we are guaranteed to have an existing chat as you can only get there via the Plus icon).fixed
all broken Jest tests under the__tests__
directory (took way too long)added
2 tests that simulatea) the front-end call to the backend API that handles chat creation
andb) the internal processes that happen within the backend API
ensured
synchronization between themember list
andadmin list
input boxes such that deleting a user from the member list also deletes them from the admin listremoved
two outdated test casesmoved
thegenerateHash
function to a utility file in theapplication
directory calledutility.ts
modified
MessagingInterface
to reflect the migration of the hashing function toutility.ts
Visual Summary of Changes
All tests passing (including those that are not specific to this pull request)
Valid inputs
Attempting to add a user as admin without adding them as a member
(Client-side validation): Attempting to submit the form without filling out anything
(Client-side validation): Attempting to submit the form without filling out a particular required field
Notification upon created text channel
MongoDB synchronization
(Client-side validation): Attempting to create a text channel that already exists (same name + members)
Known Issues