--- a/iro/model/message.py Mon Feb 13 19:50:01 2012 +0100
+++ b/iro/model/message.py Mon Feb 13 19:52:54 2012 +0100
@@ -4,8 +4,10 @@
from email.header import Header
class Message:
- def __init__(self,content):
+ def __init__(self,content, typ="Message"):
self.content=content
+ self.typ = typ
+
def getContent(self):
return self.content
@@ -18,7 +20,7 @@
class SMS(Message):
def __init__(self, cont):
- Message.__init__(self,cont)
+ Message.__init__(self, cont, typ="sms")
def sendto(self,anbieter,recipients):
anbieter.sendSMS(self,recipients)
@@ -26,7 +28,7 @@
class Fax(Message):
def __init__(self,header,cont,attachments):
- Message.__init__(self,cont)
+ Message.__init__(self,cont, typ="fax")
self.header=header
self.attachments=attachments
@@ -56,7 +58,7 @@
sub=Header(subject.encode('utf-8'), 'utf-8')
con['Subject']=sub
self.frm=frm
- Message.__init__(self, con)
+ Message.__init__(self, con, typ='mail')
def as_string(self):
return self.Message.as_string()