Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit 055a24f

Browse files
committed
Merge branch kingprapop:patch-1 (PR #183)
2 parents 7db8f54 + 0b3aa1c commit 055a24f

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

skpy/event.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,24 @@ class SkypeEndpointEvent(SkypeEvent):
103103
Name of the device connected with this endpoint.
104104
capabilities (str list):
105105
Features available on the device.
106+
type (str):
107+
Numeric type of client that the device identifies as.
108+
version (str):
109+
Software version of the client.
106110
"""
107111

108-
attrs = SkypeEvent.attrs + ("userId", "name", "capabilities")
112+
attrs = SkypeEvent.attrs + ("userId", "name", "capabilities", "type", "version")
109113

110114
@classmethod
111115
def rawToFields(cls, raw={}):
112116
fields = super(SkypeEndpointEvent, cls).rawToFields(raw)
113117
res = raw.get("resource", {})
118+
public = res.get("publicInfo", {})
114119
fields.update({"userId": SkypeUtils.userToId(res.get("selfLink")),
115120
"name": res.get("privateInfo", {}).get("epname"),
116-
"capabilities": list(filter(None, res.get("publicInfo", {})
117-
.get("capabilities", "").split(" | ")))})
121+
"capabilities": list(filter(None, public.get("capabilities", "").split(" | "))),
122+
"type": public.get("typ"),
123+
"version": public.get("skypeNameVersion")})
118124
return fields
119125

120126

0 commit comments

Comments
 (0)