ehForwarderBot / efb-fb-messenger-slave

EFB Facebook Messenger Slave, a channel for EH Forwarder Bot.
GNU Affero General Public License v3.0
8 stars 0 forks source link

Unknown marketplace thread type #7

Open blueset opened 5 years ago

blueset commented 5 years ago
Traceback (most recent call last):

  File "/usr/local/lib/python3.6/dist-packages/fbchat/client.py", line 2278, in _parseMessage
    thread_id=thread_id, thread_type=thread_type, ts=ts, metadata=metadata, msg=m)

  File "/usr/local/lib/python3.6/dist-packages/efb_fb_messenger_slave/efms_client.py", line 384, in onMessage
    threading.Thread(target=self.on_message, args=args, kwargs=kwargs).run()

  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)

  File "/usr/local/lib/python3.6/dist-packages/efb_fb_messenger_slave/efms_client.py", line 412, in on_message
    efb_msg = self.build_message(mid, thread_id, author_id, message_object)

  File "/usr/local/lib/python3.6/dist-packages/efb_fb_messenger_slave/efms_client.py", line 442, in build_message
    efb_msg.chat = EFMSChat(self.channel, uid=thread_id)

  File "/usr/local/lib/python3.6/dist-packages/efb_fb_messenger_slave/efms_chat.py", line 47, in __init__
    self.load_chat()

  File "/usr/local/lib/python3.6/dist-packages/efb_fb_messenger_slave/efms_chat.py", line 64, in load_chat
    thread = self.client.fetchThreadInfo(self.chat_uid)[str(self.chat_uid)]

  File "/usr/local/lib/python3.6/dist-packages/fbchat/client.py", line 816, in fetchThreadInfo
    raise FBchatException('{} had an unknown thread type: {}'.format(thread_ids[i], entry))

fbchat.models.FBchatException: 2267017340086666 had an unknown thread type: {'thread_key': {'thread_fbid': '2267017340086666', 'other_user_id': None}, 'name': 'Vatsal · Dell 23″ professional monitor', 'last_message': {'nodes': [{'snippet': 'Yes', 'message_sender': {'messaging_actor': {'id': '100001078163495'}}, 'timestamp_precise': '1561698007567', 'commerce_message_type': None, 'extensible_attachment': None, 'sticker': None, 'blob_attachments': []}]}, 'unread_count': 0, 'messages_count': 4, 'image': {'uri': 'https://scontent-lga3-1.xx.fbcdn.net/v/t1.6435-9/65204446_2323057997740116_7556936468447363072_n.jpg?_nc_cat=107&_nc_oc=AQm_NfLGwHYCryMpEEf-XDmSRxY9q-rEwSLpWEEDCd_XndgWZyc7SATD4MxsDK9S-3k&_nc_ht=scontent-lga3-1.xx&oh=780f85a4d9c582503bda029f99a3ef61&oe=5DC538D4'}, 'updated_time_precise': '1561698007567', 'mute_until': None, 'is_pin_protected': False, 'is_pinned': False, 'is_viewer_subscribed': True, 'thread_queue_enabled': True, 'folder': 'INBOX', 'has_viewer_archived': False, 'is_page_follow_up': False, 'cannot_reply_reason': None, 'ephemeral_ttl_mode': 0, 'customization_info': None, 'thread_theme': None, 'thread_admins': [], 'approval_mode': 0, 'joinable_mode': {'mode': '0', 'link': ''}, 'group_approval_queue': {'nodes': []}, 'thread_queue_metadata': {'approval_requests': {'nodes': []}}, 'event_reminders': {'nodes': []}, 'montage_thread': None, 'last_read_receipt': {'nodes': [{'timestamp_precise': '1561698007567'}]}, 'related_page_thread': None, 'rtc_call_data': {'call_state': 'NO_ONGOING_CALL', 'server_info_data': '', 'initiator': None}, 'marketplace_thread_data': {'for_sale_item': {'id': '1062874203904587', 'story_id': 'UzpfSTEwMTc5OTg1ODQ5MzE2ODI6MzEyMzQ4MTAyOTgwMDQ5', 'group_commerce_item_title': 'Dell 23″ professional monitor', 'formatted_price': {'text': '$85'}, 'location': {'reverse_geocode': {'city': 'Melbourne', 'state': 'VIC'}}, 'is_sold': False, 'primary_photo': {'image': {'uri': 'https://scontent-lga3-1.xx.fbcdn.net/v/t1.0-9/65318151_2323056564406926_4420521933230047232_n.jpg?_nc_cat=105&_nc_oc=AQmOFbY8cen93JdW7YDA76UabKUii6qaLRxIjYsainhug_MCILx2MVDh4DPtqmOSKCA&_nc_ht=scontent-lga3-1.xx&oh=a1f59e43804762567bc676119a46b571&oe=5D7C91CD'}}, 'url': 'https://www.facebook.com/marketplace/item/1062874203904587/'}, 'buyer': {'id': '623231456'}, 'seller': {'id': '100001078163495'}}, 'associated_object': None, 'privacy_mode': 1, 'reactions_mute_mode': 'REACTIONS_NOT_MUTED', 'mentions_mute_mode': 'MENTIONS_NOT_MUTED', 'customization_enabled': True, 'thread_type': 'MARKETPLACE', 'participant_add_mode_as_string': 'ADD', 'is_canonical_neo_user': False, 'participants_event_status': [], 'page_comm_item': None, 'admin_model_status_string': 'not_supported', 'groups_sync_status_string': 'UNSET', 'groups_sync_metadata': None, 'saved_messages': [], 'description': None, 'joinable_link': None, 'all_participants': {'nodes': [{'messaging_actor': {'id': '623231456', '__typename': 'User'}}, {'messaging_actor': {'id': '100001078163495', '__typename': 'User'}}]}}
blueset commented 5 years ago

Upstream issue fbchat#408.