mikelustosa / Projeto-TInject

Projeto TInject
246 stars 132 forks source link

&type GP2 #63

Closed leoguitar2006 closed 1 year ago

leoguitar2006 commented 1 year ago

Bom dia. Em alguns clientes, a primeira mensagem do dia ou então algumas que o cache recuperam, chegam com a property &type do objeto AMessage do evento OnGetUnReadMessages com o conteúdo "gp2" e o AMessage.body vazio.

Atualmente trato os tipos 'chat', 'ptt', 'video', 'image', 'document' e 'revoked'. Como tratar esse tipo e o que ele significa ? Consigo recuperar o conteúdo de alguma forma ?

Abaixo, uma linha de log onde extrai os conteúdos de AMessage.body e AMessage.type: Tipo da Mensagem -> Conteudo: - Tipo: gp2

mikelustosa commented 1 year ago

Esses são o possíveis tipos de mensagens:

Array of stringsItems Enum: "text" "notification" "notification_template" "group_notification" "gp2" "broadcast_notification" "e2e_notification" "call_log" "protocol" "chat" "location" "payment" "vcard" "ciphertext" "multi_vcard" "revoked" "oversized" "groups_v4_invite" "hsm" "template_button_reply" "image" "video" "audio" "ptt" "sticker" "document" "product" "order" "list" "button" "buttons_response" "list_response" "reaction" "interactive" "reaction_enc" "poll_creation" "poll_update" "request_phone_number" "biz-cover-photo" "keep_in_chat" "native_flow" "unknown" --

Então, a solução é ignorar o tipo gp2 por enquanto.