From: Dennis Collaris Date: Sat, 2 Jul 2016 15:56:04 +0000 (+0200) Subject: Merge pull request #38 from cocodelabs/kylef/remove-devices X-Git-Tag: 1.1.0~8 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=ed4bb531d26d5fd4144fd45058b89a31b49f5aea;p=znc-palaver.git Merge pull request #38 from cocodelabs/kylef/remove-devices Remove devices when API returns 401 --- ed4bb531d26d5fd4144fd45058b89a31b49f5aea diff --cc palaver.cpp index 04a169c,372f0c2..8ffdd33 --- a/palaver.cpp +++ b/palaver.cpp @@@ -671,12 -689,9 +689,12 @@@ public const CString sNetworkID = GetNetworkID(*module.GetNetwork()); sJSON += ",\"network\": \"" + sNetworkID.Replace_n("\"", "\\\"") + "\""; } + if (!sIntent.empty()) { + sJSON += ",\"intent\": \"" + sIntent + "\""; + } sJSON += "}"; - PLVHTTPSocket *pSocket = new PLVHTTPSocket(&module, "POST", GetPushEndpoint(), mcsHeaders, sJSON); + PLVHTTPSocket *pSocket = new PLVHTTPNotificationSocket(&module, GetToken(), "POST", GetPushEndpoint(), mcsHeaders, sJSON); module.AddSocket(pSocket); }