[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [ruqola] src/ruqolacore: changeGroupsAnnouncement was implemented in 0.70
From:       Laurent Montel <null () kde ! org>
Date:       2018-09-24 11:55:35
Message-ID: E1g4PSh-0002TS-Ts () code ! kde ! org
[Download RAW message or body]

Git commit afdcd14bb706da3be2ae87e213ecfe1db4984260 by Laurent Montel.
Committed on 24/09/2018 at 11:55.
Pushed by mlaurent into branch 'master'.

changeGroupsAnnouncement was implemented in 0.70

M  +5    -5    src/ruqolacore/rocketchataccount.cpp

https://commits.kde.org/ruqola/afdcd14bb706da3be2ae87e213ecfe1db4984260

diff --git a/src/ruqolacore/rocketchataccount.cpp b/src/ruqolacore/rocketchataccount.cpp
index 029f19a0..52d9218f 100644
--- a/src/ruqolacore/rocketchataccount.cpp
+++ b/src/ruqolacore/rocketchataccount.cpp
@@ -767,12 +767,12 @@ void RocketChatAccount::changeChannelSettings(const QString &roomId, RocketChatA
         if (channelType == QStringLiteral("c")) {
             restApi()->changeChannelAnnouncement(roomId, newValue.toString());
         } else if (channelType == QStringLiteral("p")) {
-#ifdef USE_RESTAPI_NO_IMPLEMENTED_YET
             //FOR the moment we can't change group announcement with restapi
-            //restApi()->changeGroupsAnnouncement(roomId, newValue.toString());
-#else
-            ddp()->setRoomAnnouncement(roomId, newValue.toString());
-#endif
+            if (mRuqolaServerConfig->hasAtLeastVersion(0, 70, 0)) {
+                restApi()->changeGroupsAnnouncement(roomId, newValue.toString());
+            } else {
+                ddp()->setRoomAnnouncement(roomId, newValue.toString());
+            }
         } else {
             qCWarning(RUQOLA_LOG) << " unsupport change announcement for type " << channelType;
         }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic