File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ import (
15
15
waBinary "go.mau.fi/whatsmeow/binary"
16
16
waProto "go.mau.fi/whatsmeow/binary/proto"
17
17
armadillo "go.mau.fi/whatsmeow/proto"
18
+ "go.mau.fi/whatsmeow/proto/waArmadilloApplication"
19
+ "go.mau.fi/whatsmeow/proto/waConsumerApplication"
18
20
"go.mau.fi/whatsmeow/proto/waMsgApplication"
19
21
"go.mau.fi/whatsmeow/proto/waMsgTransport"
20
22
"go.mau.fi/whatsmeow/types"
@@ -301,6 +303,20 @@ type FBMessage struct {
301
303
Application * waMsgApplication.MessageApplication // The second level of wrapping the message was in
302
304
}
303
305
306
+ func (evt * FBMessage ) GetConsumerApplication () * waConsumerApplication.ConsumerApplication {
307
+ if consumerApp , ok := evt .Message .(* waConsumerApplication.ConsumerApplication ); ok {
308
+ return consumerApp
309
+ }
310
+ return nil
311
+ }
312
+
313
+ func (evt * FBMessage ) GetArmadillo () * waArmadilloApplication.Armadillo {
314
+ if armadillo , ok := evt .Message .(* waArmadilloApplication.Armadillo ); ok {
315
+ return armadillo
316
+ }
317
+ return nil
318
+ }
319
+
304
320
// UnwrapRaw fills the Message, IsEphemeral and IsViewOnce fields based on the raw message in the RawMessage field.
305
321
func (evt * Message ) UnwrapRaw () * Message {
306
322
evt .Message = evt .RawMessage
You can’t perform that action at this time.
0 commit comments