From 9bdd52168b97964236af23662fbaa31f1d84f969 Mon Sep 17 00:00:00 2001
From: Konstantinos Sideris <sideris.konstantin@gmail.com>
Date: Sat, 19 May 2018 22:00:45 +0300
Subject: [PATCH] Fix CI errors

---
 README.md                          |  2 +-
 examples/crypto_bot.cpp            | 15 +++++++++++----
 include/mtxclient/crypto/types.hpp |  2 +-
 lib/crypto/client.cpp              |  4 ++--
 4 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index cbfc8cbfb..2871395ac 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ mtxclient
 [![Build Status](https://travis-ci.org/mujx/mtxclient.svg?branch=master)](https://travis-ci.org/mujx/mtxclient)
 [![Build status](https://ci.appveyor.com/api/projects/status/5hl7a6dc5s60xpxy/branch/master?svg=true)](https://ci.appveyor.com/project/mujx/mtxclient/branch/master)
 [![codecov](https://codecov.io/gh/mujx/mtxclient/branch/master/graph/badge.svg)](https://codecov.io/gh/mujx/mtxclient)
-[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)
+[![experimental](https://img.shields.io/badge/stability-experimental-orange.svg)](http://github.com/badges/stability-badges)
 
 Client API library for the Matrix protocol, built on top of Boost.Asio.
 
diff --git a/examples/crypto_bot.cpp b/examples/crypto_bot.cpp
index 248a4ef1b..8171af80b 100644
--- a/examples/crypto_bot.cpp
+++ b/examples/crypto_bot.cpp
@@ -1,10 +1,10 @@
 #include <boost/algorithm/string/predicate.hpp>
 #include <boost/beast.hpp>
 
+#include "spdlog/spdlog.h"
 #include <atomic>
 #include <iostream>
 #include <json.hpp>
-#include <spdlog/spdlog.h>
 #include <unistd.h>
 #include <variant.hpp>
 
@@ -47,6 +47,9 @@ save_device_keys(const mtx::responses::QueryKeys &res);
 void
 mark_encrypted_room(const RoomId &id);
 
+void
+handle_to_device_msgs(const std::vector<nlohmann::json> &to_device);
+
 //! Metadata associated with each active megolm session.
 struct GroupSessionMsgData
 {
@@ -196,9 +199,7 @@ parse_messages(const mtx::responses::Sync &res)
         }
 
         // Check if we have any new m.room_key messages (i.e starting a new megolm session)
-        for (const auto &id : res.to_device) {
-                cout << id.dump(2) << endl;
-        }
+        handle_to_device_msgs(res.to_device);
 
         // Check if the uploaded one time keys are enough
         for (const auto &device : res.device_one_time_keys_count) {
@@ -366,6 +367,12 @@ get_device_keys(const UserId &user)
         });
 }
 
+void
+handle_to_device_msgs(const std::vector<nlohmann::json> &to_device)
+{
+        (void)to_device;
+}
+
 void
 login_cb(const mtx::responses::Login &, RequestErr err)
 {
diff --git a/include/mtxclient/crypto/types.hpp b/include/mtxclient/crypto/types.hpp
index 5722c4a4f..e0a30cd20 100644
--- a/include/mtxclient/crypto/types.hpp
+++ b/include/mtxclient/crypto/types.hpp
@@ -53,4 +53,4 @@ from_json(const nlohmann::json &obj, OneTimeKeys &keys)
         keys.curve25519 = obj.at("curve25519").get<std::map<std::string, std::string>>();
 }
 }
-};
+}
diff --git a/lib/crypto/client.cpp b/lib/crypto/client.cpp
index 1cb24c6f3..c28e58b32 100644
--- a/lib/crypto/client.cpp
+++ b/lib/crypto/client.cpp
@@ -1,9 +1,9 @@
 #include <iostream>
 
 #include "mtxclient/crypto/client.hpp"
-#include <olm/base64.hh>
 
-#include <spdlog/spdlog.h>
+#include "spdlog/spdlog.h"
+#include <olm/base64.hh>
 
 namespace {
 auto logger = spdlog::stdout_color_mt("crypto");
-- 
GitLab