If there are log entries (such as changing nickname or emoji or color) in the history they are nonetheless treated as messages at https://github.com/Schmavery/facebook-chat-api/blob/9b85a79c3dafca33d6f4d36f6c00fc373903698a/src/getThreadHistory.js#L56, which strips out all of the useful log data.
This seems related to #313
I'd love if someone was able to clean up the logic in getThreadHistory, it's pretty old now. There's been some error handling logic added recently, but it could still use some work.
How about for every message from getThreadHistory, instead of calling utils.formatMessage, another helper method is called that reads the action_type property of the message object and returns the formatted message from the correct formatter? It shouldn't be too difficult or complex; I'll put together a PR shortly. (Thanks for working on this library by the way; it's really really helpful)
Sounds about right, hopefully that will work! Let me know if you run into any problems.
Thanks again @GEOFBOT
Most helpful comment
This seems related to #313
I'd love if someone was able to clean up the logic in getThreadHistory, it's pretty old now. There's been some error handling logic added recently, but it could still use some work.