Changeset 50:b69ca8f7174e in ralphm-patches for roster_item_more.patch


Ignore:
Timestamp:
Jun 1, 2011, 9:29:29 AM (9 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
Message:

Cleanup JIDs a bit more and adjust affected patches.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roster_item_more.patch

    r49 r50  
    11# HG changeset patch
    2 # Parent 542d8f19d4438edd7493773cb7a6e0d5e1581d0c
     2# Parent 2741eaf2b765b6b175a9da29669c23ce13e2a14c
    33
    4 diff -r 542d8f19d443 wokkel/im.py
    5 --- a/wokkel/im.py      Wed May 25 09:37:04 2011 +0200
    6 +++ b/wokkel/im.py      Wed May 25 09:39:42 2011 +0200
    7 @@ -373,6 +373,12 @@
     4diff -r 2741eaf2b765 wokkel/im.py
     5--- a/wokkel/im.py      Wed May 25 20:26:47 2011 +0200
     6+++ b/wokkel/im.py      Wed May 25 20:27:04 2011 +0200
     7@@ -371,6 +371,12 @@
    88     @ivar groups: Set of groups this contact is categorized in. Groups are
    99                   represented by an opaque identifier of type C{unicode}.
     
    1818 
    1919     __subscriptionStates = {(False, False): None,
    20 @@ -383,15 +389,17 @@
     20@@ -381,15 +387,17 @@
    2121     def __init__(self, entity, subscriptionTo=False, subscriptionFrom=False,
    2222                        name=None, groups=None):
     
    3535+
    3636 
    37      def __getJID(self):
    38          warnings.warn("Use RosterItem.entity instead.", DeprecationWarning)
    39 @@ -535,6 +543,8 @@
     37     def toElement(self):
     38         element = domish.Element((NS_ROSTER, 'item'))
     39@@ -505,6 +513,8 @@
     40             raise error.StanzaError('service-unavailable')
    4041 
    41          itemElement = iq.query.item
    4242         item = RosterItem.fromElement(iq.query.item)
    4343+        if iq.hasAttribute('from'):
    44 +            item.sender = internJID(iq['from'])
     44+            item.sender = jid.internJID(iq['from'])
    4545 
    4646         if item.remove:
    4747             d = defer.maybeDeferred(self.onRosterRemove, item.entity)
    48 diff -r 542d8f19d443 wokkel/test/test_im.py
    49 --- a/wokkel/test/test_im.py    Wed May 25 09:37:04 2011 +0200
    50 +++ b/wokkel/test/test_im.py    Wed May 25 09:39:42 2011 +0200
    51 @@ -815,9 +815,9 @@
     48diff -r 2741eaf2b765 wokkel/test/test_im.py
     49--- a/wokkel/test/test_im.py    Wed May 25 20:26:47 2011 +0200
     50+++ b/wokkel/test/test_im.py    Wed May 25 20:27:04 2011 +0200
     51@@ -764,9 +764,9 @@
    5252         return d
    5353 
     
    6161         xml = """
    6262           <iq type='set' from='bad@example.org'>
    63 @@ -841,6 +841,34 @@
     63@@ -790,6 +790,34 @@
    6464         return d
    6565 
Note: See TracChangeset for help on using the changeset viewer.