Skip to content

Commit

Permalink
'#2400: Handle system message type 91 (all members can add others).
Browse files Browse the repository at this point in the history
  • Loading branch information
wladimirleite committed Jan 7, 2025
1 parent d7523da commit 77ea3e3
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ WhatsAppReport.Days=days
WhatsAppReport.Hours=hours
WhatsAppReport.CommunityChangedOnlyAdminsCanAdd=Only community admins can add groups.
WhatsAppReport.CommunityChangedAllMembersCanAdd=Now all community members can add groups.
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=changed this group's settings to allow only admins to add other users to this group.
WhatsAppReport.GroupChangedAllMembersCanAdd=changed this group's settings to allow all members to add others to this group.
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=changed this group's settings to allow only admins to add others to this group.
WhatsAppReport.GroupChangedAllMembersCanEdit=changed this group's settings to allow all participants to edit this group's info.
WhatsAppReport.GroupChangedOnlyAdminsCanEdit=changed this group's settings to allow only admins to edit this group's info.
WhatsAppReport.GroupChangedAllMembersCanSend=changed this group's settings to allow all participants to send messages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ WhatsAppReport.Hours=hours[TBT]
WhatsAppReport.Days=days[TBT]
WhatsAppReport.CommunityChangedOnlyAdminsCanAdd=Only community admins can add groups.[TBT]
WhatsAppReport.CommunityChangedAllMembersCanAdd=Now all community members can add groups.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=changed this group's settings to allow only admins to add other users to this group.[TBT]
WhatsAppReport.GroupChangedAllMembersCanAdd=changed this group's settings to allow all members to add others to this group.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=changed this group's settings to allow only admins to add others to this group.[TBT]
WhatsAppReport.GroupChangedAllMembersCanEdit=changed this group's settings to allow all participants to edit this group's info.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanEdit=changed this group's settings to allow only admins to edit this group's info.[TBT]
WhatsAppReport.GroupChangedAllMembersCanSend=changed this group's settings to allow all participants to send messages.[TBT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ WhatsAppReport.Hours=hours[TBT]
WhatsAppReport.Days=days[TBT]
WhatsAppReport.CommunityChangedOnlyAdminsCanAdd=Only community admins can add groups.[TBT]
WhatsAppReport.CommunityChangedAllMembersCanAdd=Now all community members can add groups.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=changed this group's settings to allow only admins to add other users to this group.[TBT]
WhatsAppReport.GroupChangedAllMembersCanAdd=changed this group's settings to allow all members to add others to this group.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=changed this group's settings to allow only admins to add others to this group.[TBT]
WhatsAppReport.GroupChangedAllMembersCanEdit=changed this group's settings to allow all participants to edit this group's info.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanEdit=changed this group's settings to allow only admins to edit this group's info.[TBT]
WhatsAppReport.GroupChangedAllMembersCanSend=changed this group's settings to allow all participants to send messages.[TBT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ WhatsAppReport.Days=jours
WhatsAppReport.Hours=heures
WhatsAppReport.CommunityChangedOnlyAdminsCanAdd=Only community admins can add groups.[TBT]
WhatsAppReport.CommunityChangedAllMembersCanAdd=Now all community members can add groups.[TBT]
WhatsAppReport.GroupChangedAllMembersCanAdd=changed this group's settings to allow all members to add others to this group.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=a modifié les paramètres de ce groupe pour permettre uniquement aux administrateurs d'ajouter d'autres utilisateurs.
WhatsAppReport.GroupChangedAllMembersCanEdit=a modifié les paramètres de ce groupe pour permettre à tous les participants d'en modifier les informations.
WhatsAppReport.GroupChangedOnlyAdminsCanEdit=a modifié les paramètres de ce groupe pour permettre uniquement aux administrateurs d'effectuer des modifications.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ WhatsAppReport.Hours=hours[TBT]
WhatsAppReport.Days=days[TBT]
WhatsAppReport.CommunityChangedOnlyAdminsCanAdd=Only community admins can add groups.[TBT]
WhatsAppReport.CommunityChangedAllMembersCanAdd=Now all community members can add groups.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=changed this group's settings to allow only admins to add other users to this group.[TBT]
WhatsAppReport.GroupChangedAllMembersCanAdd=changed this group's settings to allow all members to add others to this group.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=changed this group's settings to allow only admins to add others to this group.[TBT]
WhatsAppReport.GroupChangedAllMembersCanEdit=changed this group's settings to allow all participants to edit this group's info.[TBT]
WhatsAppReport.GroupChangedOnlyAdminsCanEdit=changed this group's settings to allow only admins to edit this group's info.[TBT]
WhatsAppReport.GroupChangedAllMembersCanSend=changed this group's settings to allow all participants to send messages.[TBT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ WhatsAppReport.Hours=horas
WhatsAppReport.Days=dias
WhatsAppReport.CommunityChangedOnlyAdminsCanAdd=Somente admins da comunidade podem adicionar grupos.
WhatsAppReport.CommunityChangedAllMembersCanAdd=Agora todos na comunidade podem adicionar grupos.
WhatsAppReport.GroupChangedAllMembersCanAdd=mudou as configurações deste grupo para permitir que todos os membros adicionem outras pessoas ao grupo.
WhatsAppReport.GroupChangedOnlyAdminsCanAdd=mudou as configurações deste grupo para permitir que somente admins adicionem outras pessoas ao grupo.
WhatsAppReport.GroupChangedAllMembersCanEdit=mudou as configurações deste grupo para permitir que todos os membros alterem os dados do grupo.
WhatsAppReport.GroupChangedOnlyAdminsCanEdit=mudou as configurações deste grupo para permitir que somente admins alterem os dados do grupo.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import static iped.parsers.whatsapp.Message.MessageType.GROUP_ADDED_TO_COMMUNITY;
import static iped.parsers.whatsapp.Message.MessageType.CONTACTED_FIND_BUSINESSES;
import static iped.parsers.whatsapp.Message.MessageType.GROUP_CHANGED_ADMIN_APPROVAL_OFF;
import static iped.parsers.whatsapp.Message.MessageType.GROUP_CHANGED_ALL_MEMBERS_CAN_ADD;
import static iped.parsers.whatsapp.Message.MessageType.GROUP_CHANGED_ALL_MEMBERS_CAN_EDIT;
import static iped.parsers.whatsapp.Message.MessageType.GROUP_CHANGED_ALL_MEMBERS_CAN_SEND;
import static iped.parsers.whatsapp.Message.MessageType.GROUP_CHANGED_ONLY_ADMINS_CAN_ADD;
Expand Down Expand Up @@ -865,6 +866,9 @@ protected Message.MessageType decodeMessageType(int messageType, int status, Int
case 90:
result = USER_ADDED_TO_COMMUNITY;
break;
case 91:
result = GROUP_CHANGED_ALL_MEMBERS_CAN_ADD;
break;
case 92:
result = GROUP_CHANGED_ONLY_ADMINS_CAN_ADD;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ public boolean isSystemMessage() {
case GROUP_ADDED_TO_COMMUNITY:
case COMMUNITY_CHANGED_ONLY_ADMINS_CAN_ADD:
case COMMUNITY_CHANGED_ALL_MEMBERS_CAN_ADD:
case GROUP_CHANGED_ALL_MEMBERS_CAN_ADD:
case GROUP_CHANGED_ALL_MEMBERS_CAN_EDIT:
case GROUP_CHANGED_ALL_MEMBERS_CAN_SEND:
case GROUP_CHANGED_ONLY_ADMINS_CAN_ADD:
Expand Down Expand Up @@ -681,7 +682,7 @@ public void setAddress(String address) {
}

public static enum MessageType {
TEXT_MESSAGE, IMAGE_MESSAGE, AUDIO_MESSAGE, VIDEO_MESSAGE, UNKNOWN_MEDIA_MESSAGE, CONTACT_MESSAGE, LOCATION_MESSAGE, SHARE_LOCATION_MESSAGE, VOICE_CALL, VIDEO_CALL, DOC_MESSAGE, GIF_MESSAGE, BLOCKED_CONTACT, UNBLOCKED_CONTACT, BUSINESS_CHAT, BUSINESS_TO_STANDARD, MESSAGES_ENCRYPTED, MESSAGES_NOW_ENCRYPTED, ENCRYPTION_KEY_CHANGED, MISSED_VOICE_CALL, MISSED_VIDEO_CALL, DELETED_MESSAGE, DELETED_BY_ADMIN, DELETED_BY_SENDER, GROUP_CREATED, USER_ADDED_TO_COMMUNITY, USER_ADDED_TO_GROUP, USER_JOINED_GROUP_FROM_COMMUNITY, USER_JOINED_GROUP_FROM_LINK, USER_JOINED_GROUP_FROM_INVITATION, USER_LEFT_GROUP, USER_REMOVED_FROM_GROUP, USER_COMMUNITY_ADMIN, URL_MESSAGE, GROUP_ICON_CHANGED, GROUP_ICON_DELETED, GROUP_DESCRIPTION_CHANGED, GROUP_DESCRIPTION_DELETED, SUBJECT_CHANGED, YOU_ADMIN, YOU_NOT_ADMIN, USER_ADMIN, WAITING_MESSAGE, STICKER_MESSAGE, REFUSED_VIDEO_CALL, REFUSED_VOICE_CALL, UNAVAILABLE_VIDEO_CALL, UNAVAILABLE_VOICE_CALL, UNKNOWN_VOICE_CALL, UNKNOWN_VIDEO_CALL, VIEW_ONCE_AUDIO_MESSAGE, VIEW_ONCE_IMAGE_MESSAGE, VIEW_ONCE_VIDEO_MESSAGE, CALL_MESSAGE, BUSINESS_META_SECURE_SERVICE, GROUP_INVITE, TEMPLATE_MESSAGE, TEMPLATE_QUOTE, POLL_MESSAGE, EPHEMERAL_DURATION_CHANGED, EPHEMERAL_SETTINGS_NOT_APPLIED, EPHEMERAL_CHANGED, EPHEMERAL_DEFAULT, EPHEMERAL_SAVE, GROUP_CHANGED_ONLY_ADMINS_CAN_ADD, GROUP_CHANGED_ONLY_ADMINS_CAN_SEND, GROUP_CHANGED_ALL_MEMBERS_CAN_SEND, GROUP_CHANGED_ONLY_ADMINS_CAN_EDIT, GROUP_CHANGED_ALL_MEMBERS_CAN_EDIT, GROUP_ONLY_ADMINS_CAN_SEND, CHANGED_DEVICE, CHANGED_NUMBER_TO, CHANGED_NUMBER_CHATTING_WITH_NEW, CHANGED_NUMBER_CHATTING_WITH_OLD, STANDARD_CHAT, SENDER_ADDED_TO_CONTACTS, SENDER_IN_CONTACTS, BUSINESS_OFFICIAL, GROUP_ADDED_TO_COMMUNITY, GROUP_REMOVED_FROM_COMMUNITY, COMMUNITY_MANAGEMENT_ACTION, COMMUNITY_WELCOME, UI_ELEMENTS, UI_ELEMENTS_QUOTE, CHAT_ADDED_PRIVACY, CHANNEL_ADDED_PRIVACY, CHANNEL_CREATED, ORDER_MESSAGE, PRODUCT_MESSAGE, BUSINESS_CHANGED_NAME, USER_JOINED_WHATSAPP, PINNED_MESSAGE, GROUP_NAME_CHANGED, AI_THIRD_PARTY, NEW_PARTICIPANTS_NEED_ADMIN_APPROVAL, RESET_GROUP_LINK, COMMUNITY_RENAMED, ANY_COMMUNITY_MEMBER_CAN_JOIN_GROUP, UNKNOWN_MESSAGE, OVER_256_MEMBERS_ONLY_ADMINS_CAN_EDIT, SECURITY_NOTIFICATIONS_NO_LONGER_AVAILABLE, CONTACTED_FIND_BUSINESSES, COMMUNITY_CHANGED_ONLY_ADMINS_CAN_ADD, COMMUNITY_CHANGED_ALL_MEMBERS_CAN_ADD, COMMUNITY_DESCRIPTION_CHANGED, COMMUNITY_NOT_AVAILABLE, GROUP_NOT_PART_OF_COMMUNITY, GROUP_CHANGED_ADMIN_APPROVAL_OFF
TEXT_MESSAGE, IMAGE_MESSAGE, AUDIO_MESSAGE, VIDEO_MESSAGE, UNKNOWN_MEDIA_MESSAGE, CONTACT_MESSAGE, LOCATION_MESSAGE, SHARE_LOCATION_MESSAGE, VOICE_CALL, VIDEO_CALL, DOC_MESSAGE, GIF_MESSAGE, BLOCKED_CONTACT, UNBLOCKED_CONTACT, BUSINESS_CHAT, BUSINESS_TO_STANDARD, MESSAGES_ENCRYPTED, MESSAGES_NOW_ENCRYPTED, ENCRYPTION_KEY_CHANGED, MISSED_VOICE_CALL, MISSED_VIDEO_CALL, DELETED_MESSAGE, DELETED_BY_ADMIN, DELETED_BY_SENDER, GROUP_CREATED, USER_ADDED_TO_COMMUNITY, USER_ADDED_TO_GROUP, USER_JOINED_GROUP_FROM_COMMUNITY, USER_JOINED_GROUP_FROM_LINK, USER_JOINED_GROUP_FROM_INVITATION, USER_LEFT_GROUP, USER_REMOVED_FROM_GROUP, USER_COMMUNITY_ADMIN, URL_MESSAGE, GROUP_ICON_CHANGED, GROUP_ICON_DELETED, GROUP_DESCRIPTION_CHANGED, GROUP_DESCRIPTION_DELETED, SUBJECT_CHANGED, YOU_ADMIN, YOU_NOT_ADMIN, USER_ADMIN, WAITING_MESSAGE, STICKER_MESSAGE, REFUSED_VIDEO_CALL, REFUSED_VOICE_CALL, UNAVAILABLE_VIDEO_CALL, UNAVAILABLE_VOICE_CALL, UNKNOWN_VOICE_CALL, UNKNOWN_VIDEO_CALL, VIEW_ONCE_AUDIO_MESSAGE, VIEW_ONCE_IMAGE_MESSAGE, VIEW_ONCE_VIDEO_MESSAGE, CALL_MESSAGE, BUSINESS_META_SECURE_SERVICE, GROUP_INVITE, TEMPLATE_MESSAGE, TEMPLATE_QUOTE, POLL_MESSAGE, EPHEMERAL_DURATION_CHANGED, EPHEMERAL_SETTINGS_NOT_APPLIED, EPHEMERAL_CHANGED, EPHEMERAL_DEFAULT, EPHEMERAL_SAVE, GROUP_CHANGED_ONLY_ADMINS_CAN_ADD, GROUP_CHANGED_ONLY_ADMINS_CAN_SEND, GROUP_CHANGED_ALL_MEMBERS_CAN_SEND, GROUP_CHANGED_ONLY_ADMINS_CAN_EDIT, GROUP_CHANGED_ALL_MEMBERS_CAN_EDIT, GROUP_ONLY_ADMINS_CAN_SEND, CHANGED_DEVICE, CHANGED_NUMBER_TO, CHANGED_NUMBER_CHATTING_WITH_NEW, CHANGED_NUMBER_CHATTING_WITH_OLD, STANDARD_CHAT, SENDER_ADDED_TO_CONTACTS, SENDER_IN_CONTACTS, BUSINESS_OFFICIAL, GROUP_ADDED_TO_COMMUNITY, GROUP_REMOVED_FROM_COMMUNITY, COMMUNITY_MANAGEMENT_ACTION, COMMUNITY_WELCOME, UI_ELEMENTS, UI_ELEMENTS_QUOTE, CHAT_ADDED_PRIVACY, CHANNEL_ADDED_PRIVACY, CHANNEL_CREATED, ORDER_MESSAGE, PRODUCT_MESSAGE, BUSINESS_CHANGED_NAME, USER_JOINED_WHATSAPP, PINNED_MESSAGE, GROUP_NAME_CHANGED, AI_THIRD_PARTY, NEW_PARTICIPANTS_NEED_ADMIN_APPROVAL, RESET_GROUP_LINK, COMMUNITY_RENAMED, ANY_COMMUNITY_MEMBER_CAN_JOIN_GROUP, UNKNOWN_MESSAGE, OVER_256_MEMBERS_ONLY_ADMINS_CAN_EDIT, SECURITY_NOTIFICATIONS_NO_LONGER_AVAILABLE, CONTACTED_FIND_BUSINESSES, COMMUNITY_CHANGED_ONLY_ADMINS_CAN_ADD, COMMUNITY_CHANGED_ALL_MEMBERS_CAN_ADD, COMMUNITY_DESCRIPTION_CHANGED, COMMUNITY_NOT_AVAILABLE, GROUP_NOT_PART_OF_COMMUNITY, GROUP_CHANGED_ADMIN_APPROVAL_OFF, GROUP_CHANGED_ALL_MEMBERS_CAN_ADD
}

public static enum MessageStatus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,10 @@ private synchronized void printMessage(PrintWriter out, Message message, boolean
out.print(name + " ");
out.println(Messages.getString("WhatsAppReport.UserAdmin") + "<br>");
break;
case GROUP_CHANGED_ALL_MEMBERS_CAN_ADD:
out.println("<div class=\"systemmessage\">");
out.println(name + " " + Messages.getString("WhatsAppReport.GroupChangedAllMembersCanAdd") + "<br>");
break;
case GROUP_CHANGED_ONLY_ADMINS_CAN_ADD:
out.println("<div class=\"systemmessage\">");
out.println(name + " " + Messages.getString("WhatsAppReport.GroupChangedOnlyAdminsCanAdd") + "<br>");
Expand Down

0 comments on commit 77ea3e3

Please sign in to comment.