Changed notification popups (if its only information then no popup will appear)
authorft
Tue, 09 Sep 2014 09:16:06 +0200
changeset 2011db6c7b63d2
parent 19 d2ab00839ba5
child 21 7fbccd896e17
Changed notification popups (if its only information then no popup will appear)
src/OsecFS.py
     1.1 --- a/src/OsecFS.py	Fri Jul 04 13:43:37 2014 +0200
     1.2 +++ b/src/OsecFS.py	Tue Sep 09 09:16:06 2014 +0200
     1.3 @@ -189,13 +189,17 @@
     1.4  
     1.5  def sendNotification (type, message):
     1.6      data = {"msgtype" : type, "text" : message}
     1.7 -    sendDataToRest ("notification", data)
     1.8 +    
     1.9 +    if (type == "information"):
    1.10 +        sendDataToRest ("message", data)
    1.11 +    else:
    1.12 +        sendDataToRest ("notification", data)
    1.13  
    1.14  def sendReadOnlyNotification():
    1.15      sendNotification("critical", "Filesystem is in read only mode. If you want to export files please initialize an encrypted filesystem.")
    1.16      
    1.17  def sendLogNotPossibleNotification():
    1.18 -    sendNotification ("critical", "Send log entry to opensecurity rest server failed.")
    1.19 +    sendNotification("critical", "Send log entry to opensecurity rest server failed.")
    1.20      
    1.21  def sendFileLog(filename, filesize, filehash, hashtype):
    1.22      data = {"filename" : filename, "filesize" : "%s" %(filesize,), "filehash" : filehash, "hashtype" : hashtype}