call: parse caller phone number for LID calls
This commit is contained in:
1 parent
914d640cc8
commit
c8bdfd36d0
2 files changed
+12
-5
No files matched your search
@@ -29,6 +29,12 @@ func (cli *Client) handleCallEvent(node *waBinary.Node) {
|
||||
CallID: cag.String("call-id"),
|
||||
GroupJID: cag.OptionalJIDOrEmpty("group-jid"),
|
||||
}
|
||||
if basicMeta.CallCreator.Server == types.HiddenUserServer {
|
||||
basicMeta.CallCreatorAlt = cag.OptionalJIDOrEmpty("caller_pn")
|
||||
} else {
|
||||
// This may not actually exist
|
||||
basicMeta.CallCreatorAlt = cag.OptionalJIDOrEmpty("caller_lid")
|
||||
}
|
||||
switch child.Tag {
|
||||
case "offer":
|
||||
cli.dispatchEvent(&events.CallOffer{
|
||||
|
||||
+6
-5
@@ -9,11 +9,12 @@ package types
|
||||
import "time"
|
||||
|
||||
type BasicCallMeta struct {
|
||||
From JID
|
||||
Timestamp time.Time
|
||||
CallCreator JID
|
||||
CallID string
|
||||
GroupJID JID
|
||||
From JID
|
||||
Timestamp time.Time
|
||||
CallCreator JID
|
||||
CallCreatorAlt JID
|
||||
CallID string
|
||||
GroupJID JID
|
||||
}
|
||||
|
||||
type CallRemoteMeta struct {
|
||||
|
||||
Reference in new issue
Block a user