From 8e594264e00e2c4073d3837515d4a01969e865a1 Mon Sep 17 00:00:00 2001
From: Edric Milaret <edric.ladent-milaret@savoirfairelinux.com>
Date: Mon, 29 Feb 2016 15:19:51 -0500
Subject: [PATCH] im: fix for old im file

- Before June19th 2015 there was no peers section in the
im history file.

Change-Id: I02b66d560a22bb04833cfb65cc71d475555b519f
Tuleap: #432
---
 src/media/textrecording.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/media/textrecording.cpp b/src/media/textrecording.cpp
index 215631de..fe6ca053 100644
--- a/src/media/textrecording.cpp
+++ b/src/media/textrecording.cpp
@@ -331,6 +331,9 @@ Media::TextRecording* Media::TextRecording::fromJson(const QList<QJsonObject>& i
     //Reconstruct the conversation
     //TODO do it right, right now it flatten the graph
     for (const Serializable::Peers* p : t->d_ptr->m_lAssociatedPeers) {
+        //Seems old version didn't store that
+        if (p->peers.isEmpty())
+            continue;
         // TODO: for now assume the convo is with only 1 CM at a time
         auto peerCM = p->peers.at(0)->m_pContactMethod;
 
-- 
GitLab