diff --git a/src/routes/_actions/stream/processMessage.js b/src/routes/_actions/stream/processMessage.js index 63bcac6e..2165b9d2 100644 --- a/src/routes/_actions/stream/processMessage.js +++ b/src/routes/_actions/stream/processMessage.js @@ -35,7 +35,10 @@ export function processMessage (instanceName, timelineName, message) { // reproduce what is done for statuses for the conversation. // // It will add new DMs as new conversations instead of updating existing threads - addStatusOrNotification(instanceName, timelineName, payload.last_status) + if (payload.last_status) { + // If the last_status doesn't exist, just ignore it. There's not much we can do in that case + addStatusOrNotification(instanceName, timelineName, payload.last_status) + } break case 'filters_changed': emit('wordFiltersChanged', instanceName) diff --git a/src/routes/_api/timelines.js b/src/routes/_api/timelines.js index bbc98876..38807ab7 100644 --- a/src/routes/_api/timelines.js +++ b/src/routes/_api/timelines.js @@ -75,7 +75,7 @@ export async function getTimeline (instanceName, accessToken, timeline, maxId, s let { json: items, headers } = await getWithHeaders(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT }) if (timeline === 'direct') { - items = items.map(item => item.last_status) + items = items.map(item => item.last_status).filter(Boolean) // ignore falsy last_status'es } return { items, headers } }