Refactor Group Chats
Pull Request Description A full rework of the group system
Feature Specs:
- Group Avatar
- Leave group chats
- Add to group chats
- Edit group chat name
Tasks Progress:
- [x] Leave Groups
- [ ] Add to groups
- [x] Remove people from groups
- [x] Store who created groups
- [ ] Change group name
- [ ] Group avatar with edit
- [x] System messages (join/leave/add)
- [x] If owner leaves then assign someone else owner (first in participant list)
The following SQL needs to be ran
ALTER TABLE npwd_messages ADD COLUMN `is_system` tinyint(4) NOT NULL DEFAULT 0;
ALTER TABLE npwd_messages ADD COLUMN `system_type` varchar(48) NOT NULL DEFAULT '';
ALTER TABLE npwd_messages ADD COLUMN `system_number` varchar(48) NOT NULL DEFAULT '';
ALTER TABLE npwd_messages_conversations ADD COLUMN `owner` varchar(48) NOT NULL DEFAULT '';
#610
Pull Request Checklist:
- [x] Have you followed the guidelines in our Contributing document and Code of Conduct?
- [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
- [x] Have you built and tested NPWD in-game after the relevant change?
One problem I just thought about will be groups that were created before this and don't have the "createdBy" defined, I could make it so any groups that don't have that will allow any member to remove another member. I also don't know if any errors will be created if "createdBy" is left blank
Tested with no createBy date, everything still works however no one can remove people (may add it so everyone can remove in the future). Also just added leaving groups
Also appears CI is failing for the frontend due to a couple small ESLint complaints.
Just need to do some last testing but this should be finished, @Mojito-Fivem would you prefer I do a separate PR for adding members to groups or keep it here
It's all under the same feature and I think it would create more issues having this without the adding members functionality
Added system messages
The following SQL is now needed (added to the original message)
ALTER TABLE npwd_messages ADD COLUMN `is_system` tinyint(4) NOT NULL DEFAULT 0;
ALTER TABLE npwd_messages ADD COLUMN `system_type` varchar(48) NOT NULL DEFAULT '';
ALTER TABLE npwd_messages ADD COLUMN `system_number` varchar(48) NOT NULL DEFAULT '';
Will there not be any chance of group calling?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
this needs to be revived 😢