Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events are returned as messages with no body while using getThreadHistory #313

Closed
un-quebec-independant opened this issue Aug 16, 2016 · 8 comments

Comments

Projects
None yet
5 participants
@un-quebec-independant
Copy link

commented Aug 16, 2016

When I use getThreadHistory, events are returned with type message, and the body item is empty.

The event's text is not on the object returned

@un-quebec-independant un-quebec-independant changed the title Events listed as messages with no body while using getThreadHistory Events are returned as messages with no body while using getThreadHistory Aug 16, 2016

@Schmavery

This comment has been minimized.

Copy link
Owner

commented Aug 17, 2016

Can you print out the result of resData.payload here and see if they've moved this information to a field with a different name? Could be an easy fix to the formatter if so.

@un-quebec-independant

This comment has been minimized.

Copy link
Author

commented Aug 17, 2016

@Schmavery
Here's two objects, the first is a normal message, and the second is a thread name change event.

{ message_id: 'id.1295979970427097',
       threading_id: null,
       offline_threading_id: '6170504581936998170',
       author: 'fbid:100000619620090',
       author_email: '100000****20090@facebook.com',
       ephemeral_ttl_mode: null,
       timestamp: 1471162936057,
       timestamp_absolute: 'Sunday',
       timestamp_relative: 'Sun',
       timestamp_datetime: 'Sunday 10:22am',
       timestamp_time_passed: 1,
       is_unread: true,
       is_forward: false,
       is_filtered_content: false,
       is_filtered_content_bh: false,
       is_filtered_content_account: false,
       is_filtered_content_quasar: false,
       is_filtered_content_invalid_app: false,
       is_sponsored: false,
       commerce_message_type: null,
       customizations: [],
       forward_count: 0,
       forward_message_ids: [],
       source: 'source:messenger:web',
       source_tags: [],
       tags: [ 'source:messenger:web', 'tq', 'cg-enabled', 'inbox' ],
       is_spoof_warning: false,
       folder: 'inbox',
       thread_fbid: '1295979970427097',
       other_user_fbid: null,
       platform_xmd: null,
       message_source: null,
       body: 'test',
       subject: null,
       has_attachment: false,
       attachments: [],
       raw_attachments: null,
       ranges: [],
       meta_ranges: null,
       thread_id: 'id.1295979970427097',
       action_type: 'ma-type:user-generated-message' },
     { message_id: 'mid.1471174770597:eff37047187e9f7b16',
       threading_id: null,
       offline_threading_id: '6170554224725793957',
       author: 'fbid:100000619620090',
       author_email: '100000****20090@facebook.com',
       ephemeral_ttl_mode: null,
       timestamp: 1471174770670,
       timestamp_absolute: 'Sunday',
       timestamp_relative: 'Sun',
       timestamp_datetime: 'Sunday 1:39pm',
       timestamp_time_passed: 1,
       is_unread: true,
       is_forward: false,
       is_filtered_content: false,
       is_filtered_content_bh: false,
       is_filtered_content_account: false,
       is_filtered_content_quasar: false,
       is_filtered_content_invalid_app: false,
       is_sponsored: false,
       commerce_message_type: null,
       customizations: [],
       forward_count: 0,
       forward_message_ids: [],
       source: 'source:messenger:web',
       source_tags: [],
       tags: [ 'source:messenger:web', 'tq', 'cg-enabled', 'inbox' ],
       is_spoof_warning: false,
       folder: 'inbox',
       thread_fbid: '1295979970427097',
       other_user_fbid: null,
       platform_xmd: null,
       message_source: null,
       log_message_type: 'log:thread-name',
       log_message_data: { name: 'testing' },
       log_message_body: 'k named the group testing.',
       thread_id: 'id.1295979970427097',
       action_type: 'ma-type:log-message' }
@Schmavery

This comment has been minimized.

Copy link
Owner

commented Aug 17, 2016

Ok, thanks for the followup. It looks like some work has to be done in utils.formatMessage() to make sure we fully support this.

@KillianKemps

This comment has been minimized.

Copy link

commented Nov 19, 2016

I've discovered the same issue when someone changed the nickname of someone else in the thread.
Thanks for all the work you've already done with this library!

framabot pushed a commit to Qowala/Qowala that referenced this issue Nov 19, 2016

Temporary fix empty messages diplay in conversation
These messages are events like nickname change.
The permanent fix will come from the facebook-chat-api library
Related issue: Schmavery/facebook-chat-api#313

framabot pushed a commit to Qowala/Qowala that referenced this issue Nov 19, 2016

Temporary fix empty messages diplay in conversation
These messages are events like nickname change.
The permanent fix will come from the facebook-chat-api library
Related issue: Schmavery/facebook-chat-api#313
@AlexGustafsson

This comment has been minimized.

Copy link

commented Dec 18, 2016

Are there any workarounds or updates to this issue?

@Schmavery

This comment has been minimized.

Copy link
Owner

commented Dec 19, 2016

Hey @AlexGustafsson, this work would be an extension of the work @ivkos is doing with #360 on #357.

@GEOFBOT

This comment has been minimized.

Copy link
Contributor

commented Apr 11, 2017

I believe that #441 should resolve this.

@Schmavery

This comment has been minimized.

Copy link
Owner

commented Apr 11, 2017

Yay

@Schmavery Schmavery closed this Apr 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.