示例#1
0
 def _NH_SelfPresenceSubscriptionGotNotify(self, notification):
     if notification.data.body and notification.data.content_type == PIDFDocument.content_type:
         try:
             pidf_doc = PIDFDocument.parse(notification.data.body)
         except ParserError:
             pass
         else:
             if pidf_doc.entity.partition('sip:')[2] != self.id:
                 return
             notification.center.post_notification('SIPAccountGotSelfPresenceState', sender=self, data=NotificationData(pidf=pidf_doc))
 def _NH_SelfPresenceSubscriptionGotNotify(self, notification):
     if notification.data.body and notification.data.content_type == PIDFDocument.content_type:
         try:
             pidf_doc = PIDFDocument.parse(notification.data.body)
         except ParserError:
             pass
         else:
             if pidf_doc.entity.partition('sip:')[2] != self.id:
                 return
             notification.center.post_notification(
                 'SIPAccountGotSelfPresenceState',
                 sender=self,
                 data=NotificationData(pidf=pidf_doc))