diff --git a/repos/entities/rocketchatattachment.h b/repos/entities/rocketchatattachment.h
index f63c78b5b492d917165372dd847d392da0b8de57..97d6d11b39316ccf77e2fcdd7b05751a4b6f92f3 100644
--- a/repos/entities/rocketchatattachment.h
+++ b/repos/entities/rocketchatattachment.h
@@ -28,14 +28,10 @@ class RocketChatAttachment : public QObject
 {
         Q_OBJECT
     public:
-        enum class attachmentsType {
-            replyMessage
-        };
-
-        RocketChatAttachment( const QString &pFileUrl, const attachmentsType &pType, const QString &pTitle );
+        RocketChatAttachment( const QString &pFileUrl, const QString &pType, const QString &pTitle );
 
         const QString &getUrl() const;
-        const attachmentsType getType() const;
+        const QString &getType() const;
         const QString &getTitle() const;
 
         int getWidth() const;
@@ -46,7 +42,7 @@ class RocketChatAttachment : public QObject
 
     protected:
         QString mUrl;
-        attachmentsType mType;
+        QString mType;
         QString mTitle;
         int mWidth = -1;
         int mHeight = -1;
diff --git a/services/messageservice.cpp b/services/messageservice.cpp
index 7967ac662fef60fa56cf42d8bb5a8f972ed25840..6d808d46be473896d0e05f72f5d37eafdde00ba6 100644
--- a/services/messageservice.cpp
+++ b/services/messageservice.cpp
@@ -19,7 +19,7 @@
  ********************************************************************************************/
 
 
-
+#include <algorithm>
 #include "messageservice.h"
 
 #include <repos/entities/rocketchatreplymessage.h>
@@ -406,7 +406,7 @@ void MessageService::loadHistoryFromAutoSource( const QSharedPointer<LoadHistory
             MessageList currentList = channelMap->values( key );
 
             if ( currentList.count() < limit ) {
-                qSort( currentList );
+                std::sort( currentList.begin(), currentList.end() );
                 double timestamp;
 
                 if ( !currentList.empty() ) {
diff --git a/services/rocketchatchannelservice.cpp b/services/rocketchatchannelservice.cpp
index 256a3d76ed7d009c684213699b7bd218886832c9..923bd58120f3589f41186cfbe87675a652ba2d15 100755
--- a/services/rocketchatchannelservice.cpp
+++ b/services/rocketchatchannelservice.cpp
@@ -574,7 +574,7 @@ void RocketChatChannelService::searchRoom( const QString &pTerm, const QString &
         channelList << searchRoomLocal( pTerm, ids, pType, names );
 
         if ( !channelList.isEmpty() ) {
-            qSort( channelList.begin(), channelList.end(), []( const QSharedPointer<RocketChatChannel> &v1, const QSharedPointer<RocketChatChannel> &v2 )->bool{
+            std::sort( channelList.begin(), channelList.end(), []( const QSharedPointer<RocketChatChannel> &v1, const QSharedPointer<RocketChatChannel> &v2 )->bool{
                 return v1->getName().toLower() < v2->getName().toLower();
             } );
             auto result = QMetaObject::invokeMethod( roomsModel, "addChannels", Q_ARG( channelVector, channelList ) );