diff --git a/plugins/notifyMyAndroid/notifyMyAndroid.py b/plugins/notifyMyAndroid/notifyMyAndroid.py index 02d52c2..c812c6a 100644 --- a/plugins/notifyMyAndroid/notifyMyAndroid.py +++ b/plugins/notifyMyAndroid/notifyMyAndroid.py @@ -281,6 +281,25 @@ def run(typ,freq,data): except KeyError: # nothing found pass + # 3. lets look for ric prefixes in pocAPIKeyList + for prefixLength in reversed(range(6)): + ricPrefix = data['ric'][:prefixLength] + #fill the ric with stars + ricPrefix = ricPrefix.ljust(8,'*') + try: + xID = ricPrefix + # data structure: pocAPIKeyList[xID][i] = (xAPIKey, xPriority, xEventPrefix) + for i in range(len(pocAPIKeyList[xID])): + xEvent = event + (xAPIKey, xPriority, xEventPrefix) = pocAPIKeyList[xID][i] + if len(xEventPrefix) > 0: + xEvent = xEventPrefix + ": " + xEvent + response = nma.pushWithAPIKey(xAPIKey, application, xEvent, msg, priority=xPriority) + checkResponse(response, xAPIKey) + except KeyError: + # nothing found + pass + # end if "POC" in typ # end if usecsv == True except: