Exemplo n.º 1
0
 def _getMessageValues(self, message):
     ploneview = getMultiAdapter((self.context, self.request), name='plone')
     mship = getToolByName(self.context, 'portal_membership')
     return {'title': message.Title(),
             'message': message.getMessage(),
             'sender': message.getSender() and mship.getMemberInfo(message.getSender()) or message.getSender(),
             'receiver': [mship.getMemberInfo(receiver) or receiver for receiver in message.getReceiver()],
             'created': ploneview.toLocalizedTime(message.CreationDate(), 1),
             'received': IReceivedMessage.providedBy(message),
             'sent': ISentMessage.providedBy(message)}
Exemplo n.º 2
0
 def isReceived(self):
     return IReceivedMessage.providedBy(self)