Merge lp:~cjcurran/friends/call-contacts-at-startup into lp:friends

Proposed by Conor Curran
Status: Merged
Merged at revision: 72
Proposed branch: lp:~cjcurran/friends/call-contacts-at-startup
Merge into: lp:friends
Diff against target: 90 lines (+30/-0)
6 files modified
friends/protocols/facebook.py (+5/-0)
friends/protocols/flickr.py (+5/-0)
friends/protocols/foursquare.py (+4/-0)
friends/protocols/identica.py (+4/-0)
friends/protocols/twitter.py (+6/-0)
friends/service/dispatcher.py (+6/-0)
To merge this branch: bzr merge lp:~cjcurran/friends/call-contacts-at-startup
Reviewer Review Type Date Requested Status
Robert Bruce Park Approve
Review via email: mp+134530@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Robert Bruce Park (robru) wrote :

Dropped contact stubs and added test coverage, merged.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'friends/protocols/facebook.py'
2--- friends/protocols/facebook.py 2012-11-06 16:05:25 +0000
3+++ friends/protocols/facebook.py 2012-11-15 17:40:29 +0000
4@@ -330,6 +330,11 @@
5 vcaws_param = EBook.VCardAttributeParam.new('jabber')
6 vcaws_param.add_value('-{}@chat.facebook.com'.format(user_id))
7 vcaws.add_param(vcaws_param)
8+
9+ vcaws_param_2 = EBook.VCardAttributeParam.new('alias')
10+ vcaws_param_2.add_value(user_fullname)
11+ vcaws.add_param(vcaws_param_2)
12+
13 vcard.add_attribute(vcaws)
14
15 if gender is not None:
16
17=== modified file 'friends/protocols/flickr.py'
18--- friends/protocols/flickr.py 2012-11-06 17:40:41 +0000
19+++ friends/protocols/flickr.py 2012-11-15 17:40:29 +0000
20@@ -120,3 +120,8 @@
21 img_url=img_url,
22 img_src=img_src,
23 img_thumb=img_thumb)
24+
25+ @feature
26+ def contacts(self):
27+ pass
28+
29
30=== modified file 'friends/protocols/foursquare.py'
31--- friends/protocols/foursquare.py 2012-11-06 16:05:25 +0000
32+++ friends/protocols/foursquare.py 2012-11-15 17:40:29 +0000
33@@ -97,3 +97,7 @@
34 url=CHECKIN_URL.format(access_token=token,
35 checkin_id=checkin_id),
36 )
37+
38+ @feature
39+ def contacts(self):
40+ pass
41
42=== modified file 'friends/protocols/identica.py'
43--- friends/protocols/identica.py 2012-10-25 05:06:23 +0000
44+++ friends/protocols/identica.py 2012-11-15 17:40:29 +0000
45@@ -71,3 +71,7 @@
46 useless. Just use search() instead.
47 """
48 raise NotImplementedError
49+
50+ def contacts(self):
51+ pass
52+
53
54=== modified file 'friends/protocols/twitter.py'
55--- friends/protocols/twitter.py 2012-11-06 16:05:25 +0000
56+++ friends/protocols/twitter.py 2012-11-15 17:40:29 +0000
57@@ -296,6 +296,11 @@
58 for tweet in response.get(self._search_result_key, []):
59 self._publish_tweet(tweet, stream='search/{}'.format(query))
60
61+ @feature
62+ def contacts(self):
63+ pass
64+
65+
66
67 class RateLimiter(BaseRateLimiter):
68 """Twitter rate limiter."""
69@@ -335,3 +340,4 @@
70 else:
71 wait_secs = rate_delta / rate_count
72 self._limits[url] = wait_secs
73+
74
75=== modified file 'friends/service/dispatcher.py'
76--- friends/service/dispatcher.py 2012-11-08 15:08:49 +0000
77+++ friends/service/dispatcher.py 2012-11-15 17:40:29 +0000
78@@ -61,6 +61,12 @@
79 signaler.add_signal('ConnectionOffline', self._on_connection_offline)
80 self._on_connection_online()
81 self.Refresh()
82+ # This needs to be moved somewhere else if we ever create that
83+ # event-based architecture and get away from a single long
84+ # running process.
85+ for account in self.account_manager.get_all():
86+ account.protocol('contacts')
87+
88
89 def _on_connection_online(self):
90 if self._timer_id is None:

Subscribers

People subscribed via source and target branches

to all changes: