1 diff -Nru mtxclient-0.9.2.orig/lib/structs/events/voip.cpp mtxclient-0.9.2/lib/structs/events/voip.cpp
2 --- mtxclient-0.9.2.orig/lib/structs/events/voip.cpp 2023-02-20 01:56:06.000000000 +0100
3 +++ mtxclient-0.9.2/lib/structs/events/voip.cpp 2023-10-07 14:59:43.056218917 +0200
8 -version(const json &obj)
9 +m_version(const json &obj)
11 auto v = obj.at("version");
12 return v.is_number() ? "0" : v.get<std::string>();
15 content.call_id = obj.at("call_id").get<std::string>();
16 content.offer = obj.at("offer").get<RTCSessionDescriptionInit>();
17 - content.version = version(obj);
18 + content.version = m_version(obj);
19 content.lifetime = obj.at("lifetime").get<uint32_t>();
20 if (content.version != "0") {
21 content.party_id = obj.at("party_id").get<std::string>();
24 content.call_id = obj.at("call_id").get<std::string>();
25 content.candidates = obj.at("candidates").get<std::vector<CallCandidates::Candidate>>();
26 - content.version = version(obj);
27 + content.version = m_version(obj);
28 if (content.version != "0") {
29 content.party_id = obj.at("party_id").get<std::string>();
33 content.call_id = obj.at("call_id").get<std::string>();
34 content.answer = obj.at("answer").get<RTCSessionDescriptionInit>();
35 - content.version = version(obj);
36 + content.version = m_version(obj);
37 if (content.version != "0") {
38 content.party_id = obj.at("party_id").get<std::string>();
41 from_json(const json &obj, CallHangUp &content)
43 content.call_id = obj.at("call_id").get<std::string>();
44 - content.version = version(obj);
45 + content.version = m_version(obj);
46 if (content.version != "0") {
47 content.party_id = obj.at("party_id").get<std::string>();
50 from_json(const json &obj, CallSelectAnswer &content)
52 content.call_id = obj.at("call_id").get<std::string>();
53 - content.version = version(obj);
54 + content.version = m_version(obj);
55 content.party_id = obj.at("party_id").get<std::string>();
56 content.selected_party_id = obj.at("selected_party_id").get<std::string>();
59 from_json(const json &obj, CallReject &content)
61 content.call_id = obj.at("call_id").get<std::string>();
62 - content.version = version(obj);
63 + content.version = m_version(obj);
64 content.party_id = obj.at("party_id").get<std::string>();