Skip to content

Commit

Permalink
'#2400: Handle system message type 158 (chat started from ad).
Browse files Browse the repository at this point in the history
  • Loading branch information
wladimirleite committed Jan 7, 2025
1 parent a9fe73d commit f1e9d4c
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ WhatsAppReport.EditedOn=Edited on
WhatsAppReport.UserJoinedWhatsApp=joined WhatsApp
WhatsAppReport.PinnedMessage=pinned a message
WhatsAppReport.AIThirdParty=This AI is from a third-party developer. Meta receives your AI chats to improve AI quality.
WhatsAppReport.ChatStartedFromAd=This chat started from an ad on Facebook or Instagram.
WhatsAppReport.Over256MembersOnlyAdminsCanEdit=This group has over 256 members so now only admins can edit the groups settings.
WhatsAppReport.SecurityNotificationsNoLongerAvailable=Security code notifications are no longer available for this chat.
UFEDChatParser.Broadcast=Broadcast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ WhatsAppReport.EditedOn=Edited on[TBT]
WhatsAppReport.UserJoinedWhatsApp=joined WhatsApp[TBT]
WhatsAppReport.PinnedMessage=pinned a message[TBT]
WhatsAppReport.AIThirdParty=This AI is from a third-party developer. Meta receives your AI chats to improve AI quality.[TBT]
WhatsAppReport.ChatStartedFromAd=This chat started from an ad on Facebook or Instagram.[TBT]
WhatsAppReport.Over256MembersOnlyAdminsCanEdit=Diese Gruppe hat mehr als 256 Mitglieder. Daher können jetzt nur noch Admins die Gruppeneinstellungen bearbeiten.
WhatsAppReport.SecurityNotificationsNoLongerAvailable=Benachrichtigungen zur Sicherheitsnummer sind für diesen Chat nicht länger verfügbar.
UFEDChatParser.Broadcast=Broadcast[TBT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ WhatsAppReport.EditedOn=Edited on[TBT]
WhatsAppReport.UserJoinedWhatsApp=joined WhatsApp[TBT]
WhatsAppReport.PinnedMessage=pinned a message[TBT]
WhatsAppReport.AIThirdParty=This AI is from a third-party developer. Meta receives your AI chats to improve AI quality.[TBT]
WhatsAppReport.ChatStartedFromAd=This chat started from an ad on Facebook or Instagram.[TBT]
WhatsAppReport.Over256MembersOnlyAdminsCanEdit=This group has over 256 members so now only admins can edit the groups settings.[TBT]
WhatsAppReport.SecurityNotificationsNoLongerAvailable=Security code notifications are no longer available for this chat.[TBT]
UFEDChatParser.Broadcast=Broadcast[TBT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ WhatsAppReport.EditedOn=Modifié en
WhatsAppReport.UserJoinedWhatsApp=a rejoint WhatsApp
WhatsAppReport.PinnedMessage=a epinglé un message
WhatsAppReport.AIThirdParty=Cette IA provient d'un développeur tiers. Meta reçoit vos discussions IA pour améliorer la qualité de l'IA.
WhatsAppReport.ChatStartedFromAd=This chat started from an ad on Facebook or Instagram.[TBT]
WhatsAppReport.Over256MembersOnlyAdminsCanEdit=Comme ce groupe inclut plus de 256 membres, désormais, seulement les admins peuvent modifier les paramètres du groupe.
WhatsAppReport.SecurityNotificationsNoLongerAvailable=Les notifications relatives aux codes de sécurité ne sont plus disponibles pour cette discoussion.
UFEDChatParser.Broadcast=Broadcast[TBT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ WhatsAppReport.EditedOn=Edited on[TBT]
WhatsAppReport.UserJoinedWhatsApp=joined WhatsApp[TBT]
WhatsAppReport.PinnedMessage=pinned a message[TBT]
WhatsAppReport.AIThirdParty=This AI is from a third-party developer. Meta receives your AI chats to improve AI quality.[TBT]
WhatsAppReport.ChatStartedFromAd=This chat started from an ad on Facebook or Instagram.[TBT]
WhatsAppReport.Over256MembersOnlyAdminsCanEdit=Dato che questo gruppo ha più di 256 membri, solo gli amministratori potranno modificarne le impostazioni.
WhatsAppReport.SecurityNotificationsNoLongerAvailable=Le notifiche sul codice di sicurezza non sono più disponibili per questa chat.
UFEDChatParser.Broadcast=Broadcast[TBT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ WhatsAppReport.EditedOn=Editada em
WhatsAppReport.UserJoinedWhatsApp=entrou no WhatsApp
WhatsAppReport.PinnedMessage=fixou uma mensagem
WhatsAppReport.AIThirdParty=Esta IA pertence a um desenvolvedor terceirizado. A Meta recebe suas conversas com IA para melhorar a qualidade desse recurso.
WhatsAppReport.ChatStartedFromAd=Conversa iniciada em um anúncio do Facebook ou Instagram.
WhatsAppReport.Over256MembersOnlyAdminsCanEdit=Agora somente admins podem editar as configurações porque o grupo tem mais de 256 membros.
WhatsAppReport.SecurityNotificationsNoLongerAvailable=As notificações sobre o código de segurança não estão mais disponíveis para esta conversa.
UFEDChatParser.Broadcast=Broadcast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import static iped.parsers.whatsapp.Message.MessageType.CHANNEL_ADDED_PRIVACY;
import static iped.parsers.whatsapp.Message.MessageType.CHANNEL_CREATED;
import static iped.parsers.whatsapp.Message.MessageType.CHAT_ADDED_PRIVACY;
import static iped.parsers.whatsapp.Message.MessageType.CHAT_STARTED_FROM_AD;
import static iped.parsers.whatsapp.Message.MessageType.COMMUNITY_MANAGEMENT_ACTION;
import static iped.parsers.whatsapp.Message.MessageType.COMMUNITY_RENAMED;
import static iped.parsers.whatsapp.Message.MessageType.COMMUNITY_WELCOME;
Expand Down Expand Up @@ -914,6 +915,9 @@ protected Message.MessageType decodeMessageType(int messageType, int status, Int
case 155:
result = AI_THIRD_PARTY;
break;
case 158:
result = CHAT_STARTED_FROM_AD;
break;
default:
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ public boolean isSystemMessage() {
case CHANGED_NUMBER_TO:
case CHANNEL_ADDED_PRIVACY:
case CHANNEL_CREATED:
case CHAT_STARTED_FROM_AD:
case COMMUNITY_MANAGEMENT_ACTION:
case DELETED_BY_ADMIN:
case DELETED_BY_SENDER:
Expand Down Expand Up @@ -683,7 +684,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, GROUP_CHANGED_ALL_MEMBERS_CAN_ADD, USER_REQUEST_TO_ADD_TO_GROUP
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, USER_REQUEST_TO_ADD_TO_GROUP, CHAT_STARTED_FROM_AD
}

public static enum MessageStatus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@ private synchronized void printMessage(PrintWriter out, Message message, boolean
out.println("<div class=\"systemmessage\">");
out.println(Messages.getString("WhatsAppReport.AIThirdParty"));
break;
case CHAT_STARTED_FROM_AD:
out.println("<div class=\"systemmessage\">");
out.println(Messages.getString("WhatsAppReport.ChatStartedFromAd"));
break;
case ENCRYPTION_KEY_CHANGED:
out.println("<div class=\"systemmessage\">");
out.print(lockedIcon);
Expand Down

0 comments on commit f1e9d4c

Please sign in to comment.