From 174ee538589543cb7f647b6a1f937b0e34317778 Mon Sep 17 00:00:00 2001 From: "Andrey E. Antipov" Date: Tue, 11 Oct 2016 07:43:29 -0700 Subject: [PATCH] Update client.py to post to groups (Issue #63) Jut followed the recipe in the issue --- fbchat/client.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fbchat/client.py b/fbchat/client.py index 777de09..170b462 100644 --- a/fbchat/client.py +++ b/fbchat/client.py @@ -264,15 +264,14 @@ class Client(object): 'manual_retry_cnt' : '0', 'signatureID' : getSignatureID(), 'has_attachment' : image_id != None, - 'other_user_fbid' : recipient_id, 'specific_to_list[0]' : 'fbid:' + str(recipient_id), 'specific_to_list[1]' : 'fbid:' + str(self.uid), } - - - - + if message_type.lower() == 'group': + data["thread_fbid"] = recipient_id + else: + data["other_user_fbid"] = recipient_id if image_id: data['image_ids[0]'] = image_id