deferred.resolve(list);
}
else
{
if (DEBUG) Timber.d("Loading messages from firebase");
<BUG>DatabaseReference messageRef = FirebasePaths.threadRef(model.getEntityID());

messageRef = FirebasePaths.appendPathComponent(messageRef, BFirebaseDefines.Path.BMessagesPath);</BUG>
Query msgQuery = messageRef.endAt(messageDate.getTime()).limitToLast(numberOffMessages + 1);
msgQuery.addListenerForSingleValueEvent(new ValueEventListener() {

deferred.resolve(list);
}
else
{
if (DEBUG) Timber.d("Loading messages from firebase");
DatabaseReference messageRef = FirebasePaths.threadRef(model.getEntityID()).child(BFirebaseDefines.Path.BMessagesPath);
Query msgQuery = messageRef.endAt(messageDate.getTime()).limitToLast(numberOffMessages + 1);
msgQuery.addListenerForSingleValueEvent(new ValueEventListener() {
