Commit 4a806a6d authored by Killian Kemps's avatar Killian Kemps
Browse files

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:
parent e17f0345
......@@ -176,8 +176,13 @@ function getFBThreadHistory(decoded, users, socket, threadID) {
return new Promise(function (resolve, reject) {
currentUser.fbApi.getThreadHistory(threadID, 0, 10, '', function (err, data) {
if(err) return console.error(err);
socket.emit('return/threadHistory', data);
// XXX Temporary fix to remove events from messages
// Permament fix is related to this issue:
const filtered_data = data.filter(function(msg) {
return msg.body || msg.attachments.length > 0;
socket.emit('return/threadHistory', filtered_data);
})().catch(function(err) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment