INNER CODE UNIT · Go

func

tulir/whatsmeow · armadillomessage.go:25

func (cli *Client) handleDecryptedArmadillo(ctx context.Context, info *types.MessageInfo, decrypted []byte, retryCount int) (handlerFailed, protobufFailed bool) {
	dec, err := decodeArmadillo(decrypted)
	if err != nil {
		cli.Log.Warnf("Failed to decode armadillo message from %s: %v", info.SourceString(), err)
		protobufFailed = true
		return
	}
	dec.Info = *info
	dec.RetryCount = retryCount
	if skdm := dec.Transport.GetProtocol().GetAncillary().GetSkdm(); skdm != nil {
		if !info.IsGroup {
			cli.Log.Warnf("Got sender key distribution message in non-group chat %s from %s (skdm group ID %s)", info.Chat, info.Sender, skdm.GetGroupID())
		} else {
			cli.handleSenderKeyDistributionMessage(ctx, info.Chat, info.Sender, skdm.AxolotlSenderKeyDistributionMessage)
		}
	}
	if dec.Message != nil || dec.FBApplication != nil {
		handlerFailed = cli.dispatchEvent(&dec)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…