-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcall_event.go
70 lines (50 loc) · 1.38 KB
/
call_event.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package tdproto
// Call information
type CallEvent struct {
// Chat or contact id
Jid JID `json:"jid"`
// Call id
Uid string `json:"uid"`
// Call buzzing
Buzz bool `json:"buzz,omitempty"`
// Creation date, iso datetime
Created ISODateTimeString `json:"created"`
// Call start. For direct calls can be empty when buzzing
Start ISODateTimeString `json:"start,omitempty"`
// Call finish
Finish ISODateTimeString `json:"finish,omitempty"`
// Call record enabled
Audiorecord bool `json:"audiorecord"`
// Call participants
Onliners []CallOnliner `json:"onliners,omitempty"`
// Version
Gentime int64 `json:"gentime"`
// Deprecated: use gentime or created
Timestamp int64 `json:"timestamp"`
}
// Call participant
type CallOnliner struct {
// Contact id
Jid JID `json:"jid"`
// Contact name
DisplayName string `json:"display_name"`
// Contact role
Role string `json:"role"`
// Contact icon
Icon string `json:"icon"`
// Microphone muted. Computed from devices muted states
Muted bool `json:"muted"`
// Video state
EnabledVideo bool `json:"enabled_video"`
// Screenshare state
EnabledScreenshare bool `json:"enabled_screenshare"`
// Member devices, strictly one for now
Devices []CallDevice `json:"devices"`
}
// Call participant device
type CallDevice struct {
// Device muted
Muted bool `json:"muted"`
// Device description
Useragent string `json:"useragent"`
}