core: fixed default message type

This commit is contained in:
Goffi 2011-01-23 14:14:47 +01:00
commit 9951b0b116

View file

@ -140,8 +140,8 @@ class SatMessageProtocol(xmppim.MessageProtocol):
return
for e in message.elements():
if e.name == "body":
type = message['type'] if message.hasAttribute('type') else 'chat' #FIXME: check specs
self.host.bridge.newMessage(message["from"], e.children[0], type, profile=self.parent.profile)
mess_type = message['type'] if message.hasAttribute('type') else 'normal'
self.host.bridge.newMessage(message["from"], e.children[0], mess_type, profile=self.parent.profile)
self.host.memory.addToHistory(self.parent.jid, jid.JID(message["from"]), self.parent.jid, "chat", e.children[0])
break