npwd icon indicating copy to clipboard operation
npwd copied to clipboard

Refactor Group Chats

Open SamShanks1 opened this issue 3 years ago • 10 comments

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)

Preview

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?

SamShanks1 avatar Jun 06 '22 01:06 SamShanks1

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

SamShanks1 avatar Jun 06 '22 01:06 SamShanks1

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

SamShanks1 avatar Jun 06 '22 14:06 SamShanks1

Also appears CI is failing for the frontend due to a couple small ESLint complaints.

Screen Shot 2022-06-09 at 9 30 59 PM

TasoOneAsia avatar Jun 10 '22 01:06 TasoOneAsia

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

SamShanks1 avatar Jun 10 '22 19:06 SamShanks1

It's all under the same feature and I think it would create more issues having this without the adding members functionality

LiamDormon avatar Jun 10 '22 19:06 LiamDormon

Added system messages

Preview

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 '';

SamShanks1 avatar Jun 11 '22 16:06 SamShanks1

Will there not be any chance of group calling?

AlamoRoleplayFiveM avatar Dec 07 '22 23:12 AlamoRoleplayFiveM

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.

stale[bot] avatar Mar 07 '23 23:03 stale[bot]

this needs to be revived 😢

TonybynMp4 avatar Oct 23 '23 16:10 TonybynMp4