diff --git a/conf/config.yaml b/conf/config.yaml index cef02d9..0d7369c 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -4,5 +4,5 @@ SERVER: reconnect_interval: 3 VERSION: - code: 119 - name: 2.2.9 \ No newline at end of file + code: 120 + name: 2.3.0 \ No newline at end of file diff --git a/lib/facebook.py b/lib/facebook.py index 7d1b00a..60ab96f 100644 --- a/lib/facebook.py +++ b/lib/facebook.py @@ -147,7 +147,7 @@ class FacebookClient(Client): res = self._payload_post('/ajax/messenger/context_banner/?profile_id=%s' % fbid, {'__user': self.uid}) return res - def addFriend(self, fbid, channel=1): + def addFriend(self, fbid, channel=1, **kwargs): how_found = RequestSource.get(channel) data = { "to_friend": fbid, @@ -156,6 +156,7 @@ class FacebookClient(Client): "logging_location": 'friends_center', "floc": 'pymk' } + data.update(kwargs) if how_found == 'profile_friends': data['ref_param'] = 'friends_tab' try: @@ -1535,6 +1536,7 @@ class FacebookClient(Client): 'extragetparams': json.dumps({"__tn__": ",dm-R-R", "eid": rand}) } res = self._get(f'/ajax/hovercard/user.php?id={fbid}', data) + return parse_html.hovercard_get_addfriend(res) def groupMembers(self, group_id, next_url=None):