Skip to content

Commit

Permalink
'#1923: Handle iOS type 10/event 5 (changed number chatting with old).
Browse files Browse the repository at this point in the history
  • Loading branch information
wladimirleite committed Jan 5, 2024
1 parent da75564 commit 0c62c57
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ WhatsAppReport.GroupChangedOnlyAdminsCanSend=changed this group's settings to al
WhatsAppReport.GroupOnlyAdminsCanSend=Only admins can send messages to this group.
WhatsAppReport.ChangedNumberTo=change to
WhatsAppReport.ChangedNumberChattingWithNew=changed their phone number. You're currently chatting with their new number.
WhatsAppReport.ChangedNumberChattingWithOld=changed their phone number to a new number. Tap to message the new number.
WhatsAppReport.SenderInContacts=is in your contacts.
WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account.
WhatsAppReport.GroupAddedToCommunity=Group was added to a community.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ WhatsAppReport.GroupChangedOnlyAdminsCanSend=changed this group's settings to al
WhatsAppReport.GroupOnlyAdminsCanSend=Only admins can send messages to this group.[TBT]
WhatsAppReport.ChangedNumberTo=change to[TBT]
WhatsAppReport.ChangedNumberChattingWithNew=changed their phone number. You're currently chatting with their new number.[TBT]
WhatsAppReport.ChangedNumberChattingWithOld=changed their phone number to a new number. Tap to message the new number.[TBT]
WhatsAppReport.SenderInContacts=is in your contacts.[TBT]
WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account.[TBT]
WhatsAppReport.GroupAddedToCommunity=Group was added to a community.[TBT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ WhatsAppReport.GroupChangedOnlyAdminsCanSend=changed this group's settings to al
WhatsAppReport.GroupOnlyAdminsCanSend=Only admins can send messages to this group.[TBT]
WhatsAppReport.ChangedNumberTo=change to[TBT]
WhatsAppReport.ChangedNumberChattingWithNew=changed their phone number. You're currently chatting with their new number.[TBT]
WhatsAppReport.ChangedNumberChattingWithOld=changed their phone number to a new number. Tap to message the new number.[TBT]
WhatsAppReport.SenderInContacts=is in your contacts.[TBT]
WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account.[TBT]
WhatsAppReport.GroupAddedToCommunity=Group was added to a community.[TBT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ WhatsAppReport.GroupChangedOnlyAdminsCanSend=changed this group's settings to al
WhatsAppReport.GroupOnlyAdminsCanSend=Only admins can send messages to this group.[TBT]
WhatsAppReport.ChangedNumberTo=change to[TBT]
WhatsAppReport.ChangedNumberChattingWithNew=changed their phone number. You're currently chatting with their new number.[TBT]
WhatsAppReport.ChangedNumberChattingWithOld=changed their phone number to a new number. Tap to message the new number.[TBT]
WhatsAppReport.SenderInContacts=is in your contacts.[TBT]
WhatsAppReport.ChatBusinessOfficial=This chat is with an official business account.[TBT]
WhatsAppReport.GroupAddedToCommunity=Group was added to a community.[TBT]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ WhatsAppReport.GroupChangedOnlyAdminsCanSend=mudou as configurações deste grup
WhatsAppReport.GroupOnlyAdminsCanSend=Somente admins podem enviar mensagens ao grupo.
WhatsAppReport.ChangedNumberTo=mudou para
WhatsAppReport.ChangedNumberChattingWithNew=mudou de número de telefone. Você está em contato com o número novo neste momento.
WhatsAppReport.ChangedNumberChattingWithOld=mudou de número de telefone. Toque para enviar uma mensagem ao novo número.
WhatsAppReport.SenderInContacts=está na sua lista de contatos.
WhatsAppReport.ChatBusinessOfficial=Você está conversando com uma conta comercial oficial.
WhatsAppReport.GroupAddedToCommunity=Grupo foi adicionado a comunidade.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static iped.parsers.whatsapp.Message.MessageType.BUSINESS_CHAT;
import static iped.parsers.whatsapp.Message.MessageType.BUSINESS_TO_STANDARD;
import static iped.parsers.whatsapp.Message.MessageType.CHANGED_NUMBER_CHATTING_WITH_NEW;
import static iped.parsers.whatsapp.Message.MessageType.CHANGED_NUMBER_CHATTING_WITH_OLD;
import static iped.parsers.whatsapp.Message.MessageType.CONTACT_MESSAGE;
import static iped.parsers.whatsapp.Message.MessageType.DELETED_BY_SENDER;
import static iped.parsers.whatsapp.Message.MessageType.ENCRYPTION_KEY_CHANGED;
Expand Down Expand Up @@ -749,6 +750,8 @@ protected Message.MessageType decodeMessageType(int messageType, int gEventType)
result = ENCRYPTION_KEY_CHANGED;
} else if (gEventType == 4) {
result = MISSED_VIDEO_CALL;
} else if (gEventType == 5) {
result = CHANGED_NUMBER_CHATTING_WITH_OLD;
} else if (gEventType == 6) {
result = CHANGED_NUMBER_CHATTING_WITH_NEW;
} else if (gEventType == 22) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ public void setOrder(MessageOrder order) {
}

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, APP_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_JOINED_GROUP, USER_JOINED_GROUP_FROM_LINK, USERS_JOINED_GROUP, USER_LEFT_GROUP, USER_REMOVED_FROM_GROUP, URL_MESSAGE, GROUP_ICON_CHANGED, GROUP_ICON_DELETED, GROUP_DESCRIPTION_CHANGED, SUBJECT_CHANGED, YOU_ADMIN, YOU_NOT_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_IMAGE_MESSAGE, VIEW_ONCE_VIDEO_MESSAGE, CALL_MESSAGE, BUSINESS_META_SECURE_SERVICE, GROUP_INVITE, TEMPLATE_MESSAGE, TEMPLATE_QUOTE, POLL_MESSAGE, EPHEMERAL_DURATION_CHANGED, EPHEMERAL_CHANGED, EPHEMERAL_DEFAULT, EPHEMERAL_SAVE, 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_NUMBER_TO, CHANGED_NUMBER_CHATTING_WITH_NEW, STANDARD_CHAT, SENDER_IN_CONTACTS, BUSINESS_OFFICIAL, GROUP_ADDED_TO_COMMUNITY, COMMUNITY_MANAGEMENT_ACTION, UI_ELEMENTS, UI_ELEMENTS_QUOTE, CHANNEL_ADDED_PRIVACY, CHANNEL_CREATED, ORDER_MESSAGE, UNKNOWN_MESSAGE
TEXT_MESSAGE, IMAGE_MESSAGE, AUDIO_MESSAGE, VIDEO_MESSAGE, UNKNOWN_MEDIA_MESSAGE, CONTACT_MESSAGE, LOCATION_MESSAGE, SHARE_LOCATION_MESSAGE, VOICE_CALL, VIDEO_CALL, APP_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_JOINED_GROUP, USER_JOINED_GROUP_FROM_LINK, USERS_JOINED_GROUP, USER_LEFT_GROUP, USER_REMOVED_FROM_GROUP, URL_MESSAGE, GROUP_ICON_CHANGED, GROUP_ICON_DELETED, GROUP_DESCRIPTION_CHANGED, SUBJECT_CHANGED, YOU_ADMIN, YOU_NOT_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_IMAGE_MESSAGE, VIEW_ONCE_VIDEO_MESSAGE, CALL_MESSAGE, BUSINESS_META_SECURE_SERVICE, GROUP_INVITE, TEMPLATE_MESSAGE, TEMPLATE_QUOTE, POLL_MESSAGE, EPHEMERAL_DURATION_CHANGED, EPHEMERAL_CHANGED, EPHEMERAL_DEFAULT, EPHEMERAL_SAVE, 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_NUMBER_TO, CHANGED_NUMBER_CHATTING_WITH_NEW, CHANGED_NUMBER_CHATTING_WITH_OLD, STANDARD_CHAT, SENDER_IN_CONTACTS, BUSINESS_OFFICIAL, GROUP_ADDED_TO_COMMUNITY, COMMUNITY_MANAGEMENT_ACTION, UI_ELEMENTS, UI_ELEMENTS_QUOTE, CHANNEL_ADDED_PRIVACY, CHANNEL_CREATED, ORDER_MESSAGE, UNKNOWN_MESSAGE
}

public static enum MessageStatus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,10 @@ private synchronized void printMessage(PrintWriter out, Message message, boolean
out.println("<div class=\"systemmessage\">");
out.println(name + " " + Messages.getString("WhatsAppReport.ChangedNumberChattingWithNew") + "<br>");
break;
case CHANGED_NUMBER_CHATTING_WITH_OLD:
out.println("<div class=\"systemmessage\">");
out.println(name + " " + Messages.getString("WhatsAppReport.ChangedNumberChattingWithOld") + "<br>");
break;
case CHANNEL_ADDED_PRIVACY:
out.println("<div class=\"systemmessage\">");
out.println(Messages.getString("WhatsAppReport.ChannelAddedPrivacy") + "<br>");
Expand Down

0 comments on commit 0c62c57

Please sign in to comment.