Compare commits

..

9 Commits

Author SHA1 Message Date
Mario Fetka 0823ec1137 Bump version to 6.0 alpha6 2026-07-07 18:44:21 +02:00
Mario Fetka 1c4ebcccd1 Restore KF6 single instance behavior 2026-07-07 18:40:15 +02:00
Mario Fetka 9fd7e99274 Bump version to 6.0 alpha5 2026-07-06 13:58:09 +02:00
Mario Fetka bf567146d8 Clean up KF6 chat window warnings 2026-07-06 13:51:57 +02:00
Mario Fetka 3bade98d2f Harden address book updates for Escargot 2026-07-06 13:38:43 +02:00
Mario Fetka bd03359d79 Bump version to 6.0 alpha4 2026-07-06 13:21:16 +02:00
Mario Fetka 89b4218853 Handle missing Escargot profile URL 2026-07-06 13:14:56 +02:00
Mario Fetka f9f479588f Fix Escargot privacy mode mapping 2026-07-06 12:40:45 +02:00
Mario Fetka 40e81af6c6 Keep Escargot login alive without storage profile 2026-07-06 11:48:10 +02:00
24 changed files with 224 additions and 57 deletions
+2 -1
View File
@@ -23,6 +23,7 @@ find_package(KF6 REQUIRED COMPONENTS
ConfigWidgets
CoreAddons
Crash
DBusAddons
IdleTime
I18n
IconThemes
@@ -55,7 +56,7 @@ else()
set(KMESS_DISABLE_LIKEBACK 0)
endif()
set(KMESS_VERSION "6.0_alpha3")
set(KMESS_VERSION "6.0_alpha6")
set(KMESS_ENABLE_DEBUG_OUTPUT 0)
set(KMESS_BUILT_DEBUGFULL FALSE)
set(HAVE_LIBISFQT 1)
+1
View File
@@ -169,6 +169,7 @@ SET(kmess_LIBS
KF6::Completion
KF6::CoreAddons
KF6::Crash
KF6::DBusAddons
KF6::IdleTime
KF6::I18n
KF6::IconThemes
+18 -2
View File
@@ -1672,8 +1672,16 @@ Chat *ChatMaster::createChat( MsnSwitchboardConnection *switchboard, bool reques
Chat *newChat;
ChatWindow *newChatWindow;
// If the new chat is a group chat, find existing group chat windows; else find private chats
const QStringList partecipants( switchboard->getContactsInChat() );
// If the new chat is a group chat, find existing group chat windows; else find private chats.
// Escargot can briefly request a chat window while the switchboard has no resolved contact yet.
QStringList partecipants( switchboard->getContactsInChat() );
partecipants.removeAll( QString() );
if( partecipants.isEmpty() )
{
kmWarning() << "Ignoring chat window request without contacts.";
return 0;
}
newChat = getContactsChat( partecipants, true );
// If the chat was requested by a contact, check if we have a chat request
@@ -1728,11 +1736,18 @@ Chat *ChatMaster::createChat( MsnSwitchboardConnection *switchboard, bool reques
if( ! newChat->initialize( switchboard ) )
{
kmDebug() << "Couldn't initialize the chat tab.";
delete newChat;
return 0;
}
// Select the chat window where to open the new tab, or create a new one
newChatWindow = createChatWindow( newChat );
if( newChatWindow == 0 )
{
kmWarning() << "Couldn't create the chat window.";
delete newChat;
return 0;
}
// Create the first tab in the chat
newChat = newChatWindow->addChatTab( newChat, switchboard->getUserStartedChat() );
@@ -1804,6 +1819,7 @@ ChatWindow *ChatMaster::createChatWindow( Chat *chat )
if( ! window->initialize() )
{
kmWarning() << "Couldn't initialize the new chat window!";
delete window;
return 0;
}
+2 -2
View File
@@ -352,7 +352,7 @@ QString ChatMessageStyle::createFallbackMessage(const ChatMessage &message)
if( ! message.hasHtmlBody() )
{
// Escape HTML, replace all emoticons, links and formatting
RichTextParser::parseMsnString( body, useEmoticons_, false, true, useFormatting_, allowEmoticonLinks_, handle, pendingEmoticonTags_ );
RichTextParser::parseMsnString( body, useEmoticons_, false, true, useFormatting_, allowEmoticonLinks_, handle, &pendingEmoticonTags_ );
// Replace font special effects, like *bold*
if( useFontEffects_ )
@@ -489,7 +489,7 @@ QString ChatMessageStyle::convertMessageToXml( const ChatMessage &message, bool
!isPresence,
(isPresence ? false : useFormatting_),
(isPresence ? false : allowEmoticonLinks_),
(isPresence ? QString() : handle), pendingEmoticonTags_ );
(isPresence ? QString() : handle), &pendingEmoticonTags_ );
if( useFontEffects_ )
{
+51 -18
View File
@@ -192,10 +192,6 @@ ChatWindow::ChatWindow( QWidget *parent )
connect( inkPenSize_, SIGNAL( valueChanged(int) ),
inkCanvas_, SLOT ( setPenSize(int) ) );
// Connect the message edit so that if its displayed color changes,
// it's checked to match the user's chosen color.
connect( messageEdit_, SIGNAL( currentColorChanged(const QColor&) ),
this, SLOT ( editorColorChanged(const QColor&) ) );
// Connect the docks signals
connect( standardEmoticonsDock_, SIGNAL( visibilityChanged(bool) ),
this, SLOT ( slotEmoticonDocksToggled() ) );
@@ -260,6 +256,10 @@ ChatWindow::~ChatWindow()
// Add a new chat tab
Chat *ChatWindow::addChatTab( Chat *newChat, bool foreground )
{
// QTabWidget emits currentChanged() from addTab(). Parent the contacts widget first
// so slotTabChanged() never sees a half-attached chat view.
newChat->getContactsWidget()->setParent( contactsDock_ );
// Connect its main signals
connect( newChat, SIGNAL( chatInfoChanged() ),
this, SLOT ( slotUpdateChatInfo() ) );
@@ -280,10 +280,6 @@ Chat *ChatWindow::addChatTab( Chat *newChat, bool foreground )
chatTabs_->setCurrentIndex( newTabIndex );
}
// Set the appropriate parent of the contactswidget.
// This is needed when a chat is moved to another window.
newChat->getContactsWidget()->setParent( contactsDock_ );
// Apply the window's settings to the tab
newChat->getContactsWidget()->setDockWidget( contactsDock_, dockWidgetArea( contactsDock_ ) );
newChat->setZoomFactor( zoomLevel_ );
@@ -501,13 +497,6 @@ void ChatWindow::createMenus()
nextTabAction_->setText ( i18n("Ne&xt Tab") );
nextTabAction_->setIconText( i18n("Ne&xt Tab") );
// Enable some default action shortcuts (preserve the original ones where needed)
nudgeAction_->setShortcut( QKeySequence( "Alt+Z" ) );
closeAction->setShortcuts( QList<QKeySequence>() << QKeySequence( "Ctrl+W" ) << closeAction->shortcut() );
closeAllAction_->setShortcuts( QList<QKeySequence>() << QKeySequence( "Ctrl+Q" ) << closeAllAction_->shortcut() );
prevTabAction_->setShortcuts( QList<QKeySequence>() << QKeySequence( QKeySequence::PreviousChild ) << prevTabAction_->shortcut() );
nextTabAction_->setShortcuts( QList<QKeySequence>() << QKeySequence( QKeySequence::NextChild ) << nextTabAction_->shortcut() );
// Set up the dock actions
contactsDockAction = contactsDock_ ->toggleViewAction();
standardEmoticonsDockAction = standardEmoticonsDock_->toggleViewAction();
@@ -517,19 +506,16 @@ void ChatWindow::createMenus()
contactsDockAction->setToolTip( i18n("Enable or disable the contacts panel") );
contactsDockAction->setText( i18nc("Toolbar button","Contacts") );
contactsDockAction->setIconText( i18nc("Toolbar button","Contacts") );
contactsDockAction->setShortcut( QKeySequence( "Ctrl+D" ) );
standardEmoticonsDockAction->setIcon( QIcon::fromTheme( "face-smile" ) );
standardEmoticonsDockAction->setToolTip( i18n("Enable or disable the standard emoticons panel") );
standardEmoticonsDockAction->setText( i18nc("Toolbar button","Emoticons") );
standardEmoticonsDockAction->setIconText( i18nc("Toolbar button","Emoticons") );
standardEmoticonsDockAction->setShortcut( QKeySequence( "Ctrl+E" ) );
customEmoticonsDockAction->setIcon( QIcon::fromTheme( "face-smile-gearhead-female" ) );
customEmoticonsDockAction->setToolTip( i18n("Enable or disable the custom emoticons panel") );
customEmoticonsDockAction->setText( i18nc("Toolbar button","My Emoticons") );
customEmoticonsDockAction->setIconText( i18nc("Toolbar button","My Emoticons") );
customEmoticonsDockAction->setShortcut( QKeySequence( "Ctrl+Y" ) );
// Add the dock toggling actions to the Panels menu
panelsMenuAction_->addAction( contactsDockAction );
@@ -601,6 +587,30 @@ void ChatWindow::createMenus()
// Add actions to actionCollection for "Settings" menu
actionCollection_->addAction( "spellCheck", spellCheckAction_ );
// Enable some default action shortcuts (preserve the original ones where needed)
auto defaultShortcuts = []( const QKeySequence &preferred, const QKeySequence &fallback )
{
QList<QKeySequence> shortcuts;
if( ! preferred.isEmpty() )
{
shortcuts << preferred;
}
if( ! fallback.isEmpty() && ! shortcuts.contains( fallback ) )
{
shortcuts << fallback;
}
return shortcuts;
};
actionCollection_->setDefaultShortcut( nudgeAction_, QKeySequence( "Alt+Z" ) );
actionCollection_->setDefaultShortcut( closeAction, QKeySequence( "Ctrl+W" ) );
actionCollection_->setDefaultShortcut( closeAllAction_, QKeySequence( "Ctrl+Q" ) );
actionCollection_->setDefaultShortcuts( prevTabAction_, defaultShortcuts( QKeySequence( QKeySequence::PreviousChild ), prevTabAction_->shortcut() ) );
actionCollection_->setDefaultShortcuts( nextTabAction_, defaultShortcuts( QKeySequence( QKeySequence::NextChild ), nextTabAction_->shortcut() ) );
actionCollection_->setDefaultShortcut( contactsDockAction, QKeySequence( "Ctrl+D" ) );
actionCollection_->setDefaultShortcut( standardEmoticonsDockAction, QKeySequence( "Ctrl+E" ) );
actionCollection_->setDefaultShortcut( customEmoticonsDockAction, QKeySequence( "Ctrl+Y" ) );
}
@@ -1436,6 +1446,15 @@ bool ChatWindow::queryExit()
// Restore the window properties (called by KMainWindow)
void ChatWindow::readProperties()
{
const KConfigGroup config( KMessConfig::instance()->getAccountConfig( currentAccount_->getHandle(), "ChatWindow" ) );
readProperties( config );
}
// Restore the window properties (called by KMainWindow)
void ChatWindow::readProperties(const KConfigGroup &config )
{
@@ -1501,6 +1520,15 @@ void ChatWindow::saveChat()
// Save the window properties (called by KMainWindow)
void ChatWindow::saveProperties()
{
KConfigGroup config( KMessConfig::instance()->getAccountConfig( currentAccount_->getHandle(), "ChatWindow" ) );
saveProperties( config );
}
// Save the window properties (called by KMainWindow)
void ChatWindow::saveProperties( KConfigGroup &config )
{
@@ -1642,6 +1670,7 @@ void ChatWindow::sendMessage()
// Don't send empty messages
if( text.trimmed().isEmpty() )
{
doSendTypingMessages_ = true;
return;
}
@@ -1664,6 +1693,8 @@ void ChatWindow::sendMessage()
// Handle command. If 'false' is returned, send it anyway.
if ( handleCommand( command ) )
{
doSendTypingMessages_ = true;
slotMessageChanged();
return;
}
}
@@ -1729,6 +1760,8 @@ void ChatWindow::sendMessage()
quickRetypeList.append( message.getBody() );
lastSentence_ = QString();
slotMessageChanged();
// Reset the last sentence counter.
// showMessage() updates chatMessages_
indexSentences_ = quickRetypeList.size();
+4 -2
View File
@@ -109,9 +109,11 @@ class ChatWindow : public KXmlGuiWindow, private Ui::ChatWindow
// Create the menus.
void createMenus();
// Restore the window properties (called by KMainWindow)
void readProperties( const KConfigGroup &config = *((const KConfigGroup *)0) ) override;
void readProperties();
void readProperties( const KConfigGroup &config ) override;
// Save the window properties (called by KMainWindow)
void saveProperties( KConfigGroup &config = *((KConfigGroup *)0) ) override;
void saveProperties();
void saveProperties( KConfigGroup &config ) override;
// Enable or disable the parts of the window which allow user interaction
void setEnabled( bool isEnabled );
// Set the window icon for this chat window
+1 -1
View File
@@ -421,7 +421,7 @@ ContactFrame* ContactsWidget::createContactFrame()
this, SIGNAL( contactBlocked( QString, bool ) ) );
// Add it to the viewBox so it appears in the widget
layout_->insertWidget( children().count() - 2, contactFrame );
layout_->insertWidget( layout_->count(), contactFrame );
// put it in the list of frames so we can find it again.
contactFrames_.append( contactFrame );
+31 -1
View File
@@ -1693,6 +1693,15 @@ void KMess::saveGlobalProperties( KConfig *sessionConfig )
// Read in account and other properties
void KMess::readProperties()
{
KConfigGroup config( KMessConfig::instance()->getGlobalConfig( "MainWindow" ) );
readProperties( config );
}
// Read in account and other properties
void KMess::readProperties( const KConfigGroup &config )
{
@@ -1705,6 +1714,15 @@ void KMess::readProperties( const KConfigGroup &config )
// Save account and other properties
void KMess::saveProperties()
{
KConfigGroup config( KMessConfig::instance()->getGlobalConfig( "MainWindow" ) );
saveProperties( config );
}
// Save account and other properties
void KMess::saveProperties( KConfigGroup &config )
{
@@ -1802,7 +1820,19 @@ void KMess::showUserProfile()
}
const QString url( currentAccount_->getUrlInformation().value( "PROFILE" ) );
KMessShared::openBrowser( QUrl::fromUserInput( url, QString(), QUrl::AssumeLocalFile ) );
QUrl profileUrl;
if( url.isEmpty() )
{
kmWarning() << "No profile URL received from the server; opening the NINA account portal instead.";
profileUrl = QUrl( "https://account.nina.chat/login/" );
}
else
{
profileUrl = QUrl::fromUserInput( url, QString(), QUrl::AssumeLocalFile );
}
KMessShared::openBrowser( profileUrl );
}
+4 -2
View File
@@ -89,11 +89,13 @@ class KMess : public KMessInterface
// Load the application's global state
void readGlobalProperties( KConfig *sessionConfig ) override;
// Read in account and other properties
void readProperties( const KConfigGroup &config = *((const KConfigGroup *)0) ) override;
void readProperties();
void readProperties( const KConfigGroup &config ) override;
// Save the application's global state
void saveGlobalProperties( KConfig *sessionConfig ) override;
// Save account and other properties
void saveProperties( KConfigGroup &config = *((KConfigGroup *)0) ) override;
void saveProperties();
void saveProperties( KConfigGroup &config ) override;
private: // Private methods
// The application is closing, after queryClose() was approved
+19
View File
@@ -28,6 +28,7 @@
#include <QCommandLineParser>
#include <KIconLoader>
#include <KWindowSystem>
#include <kcoreaddons_version.h>
@@ -84,6 +85,24 @@ KMessApplication::~KMessApplication()
void KMessApplication::activateRequested( const QStringList &arguments, const QString &workingDirectory )
{
Q_UNUSED( arguments );
Q_UNUSED( workingDirectory );
if( contactListWindow_ == 0 )
{
return;
}
contactListWindow_->show();
KWindowSystem::updateStartupId( contactListWindow_->windowHandle() );
contactListWindow_->raise();
KWindowSystem::activateWindow( contactListWindow_->windowHandle() );
}
/**
* Return the contact list window
*/
+3
View File
@@ -65,6 +65,9 @@ class KMessApplication : public QApplication
void setQuitSelected(bool quitSelected);
void initialize( const QCommandLineParser &parser );
public slots:
void activateRequested( const QStringList &arguments, const QString &workingDirectory );
private slots:
void slotAboutToQuit();
void slotLastWindowClosed();
+2 -2
View File
@@ -72,9 +72,9 @@ class KMessInterface : public KXmlGuiWindow
virtual bool initialize();
// Restore the window properties (called by KMainWindow)
virtual void readProperties( const KConfigGroup &config = *((const KConfigGroup *)0) ) override;
virtual void readProperties( const KConfigGroup &config ) override;
// Save the window properties (called by KMainWindow)
virtual void saveProperties( KConfigGroup &config = *((KConfigGroup *)0) ) override;
virtual void saveProperties( KConfigGroup &config ) override;
protected slots: // Protected slots
// "Add a new contact" was selected from the menu.
+1 -1
View File
@@ -774,7 +774,7 @@ void KMessTest::testMsnPlusInteractive()
// New parser
text = input->document()->toPlainText();
RichTextParser::parseMsnString( text, true, true, true, true, true, "contact1@kmess.org", pending );
RichTextParser::parseMsnString( text, true, true, true, true, true, "contact1@kmess.org", &pending );
cleaned = parsed = text;
RichTextParser::getCleanString( cleaned );
+6
View File
@@ -21,6 +21,7 @@
#include "kmessdebug.h"
#include <KAboutData>
#include <KDBusService>
#include <KLocalizedString>
#include <QCommandLineOption>
@@ -64,6 +65,7 @@ int main(int argc, char *argv[])
"http://www.kmess.org/", // home page
"bugs" "@" "kmess" "." "org" // address for bugs
);
aboutData.setOrganizationDomain( "kmess.org" );
// Note all email addresses are written in an anti-spam style.
@@ -243,6 +245,10 @@ int main(int argc, char *argv[])
parser.process( kmessApp );
aboutData.processCommandLine( &parser );
KDBusService dbusService( KDBusService::Unique );
QObject::connect( &dbusService, &KDBusService::activateRequested,
&kmessApp, &KMessApplication::activateRequested );
kmessApp.initialize( parser );
return kmessApp.exec();
+2 -2
View File
@@ -498,7 +498,7 @@ void MsnNotificationConnection::changePersonalProperties( const QString& cid, in
{
// Send BLP command for privacy settings, please refer to:
// http://msnpiki.msnfanatic.com/index.php/Command:BLP
const QString blpToSend( ( blp == 0 ) ? "BL" : "AL" );
const QString blpToSend( ( blp == 2 ) ? "BL" : "AL" );
sendCommand( "BLP", blpToSend );
if( legacyMsnAuthentication_ )
@@ -2752,7 +2752,7 @@ void MsnNotificationConnection::removeContact(QString handle, bool block)
// Remove the contact from AB
AddressBookService *addressBook = createAddressBookService();;
addressBook->deleteContact( contactId );
addressBook->deleteContact( contactId, handle );
// if not blocking, make sure we re-add to the Allow list.
// ABContactDelete removes them from the Allow list for some reason. This was what
+6 -3
View File
@@ -1733,7 +1733,7 @@ void MsnSwitchboardConnection::sendInk( InkFormat format, const QByteArray& ink
bool capable = true;
ContactBase *contact;
int inkCapabilityFlag;
ContactBase::MsnClientCapabilities inkCapabilityFlag;
switch( format )
{
case FORMAT_ISF:
@@ -1742,6 +1742,9 @@ void MsnSwitchboardConnection::sendInk( InkFormat format, const QByteArray& ink
case FORMAT_GIF:
inkCapabilityFlag = ContactBase::MSN_CAP_INK_GIF;
break;
default:
kmWarning() << "Refusing to send unsupported ink format:" << format;
return;
}
// Verify whether all contacts are capable to view this Ink message or not
@@ -1750,14 +1753,14 @@ void MsnSwitchboardConnection::sendInk( InkFormat format, const QByteArray& ink
{
contact = currentAccount_->getContactByHandle( handle );
if( ! contact->hasCapability( ContactBase::MSN_CAP_MULTI_PACKET )
|| ! contact->hasCapability( (ContactBase::MsnClientCapabilities)inkCapabilityFlag ) )
|| ! contact->hasCapability( inkCapabilityFlag ) )
{
unsupportingContact = contact;
capable = false;
#ifdef KMESSDEBUG_SWITCHBOARD_GENERAL
kmDebug() << "Contact" << handle << "does not support our wink. "
<< "Has multipacket?" << contact->hasCapability( ContactBase::MSN_CAP_MULTI_PACKET )
<< "Has this ink type support?" << contact->hasCapability( (ContactBase::MsnClientCapabilities)inkCapabilityFlag );
<< "Has this ink type support?" << contact->hasCapability( inkCapabilityFlag );
#endif
break;
}
+26 -9
View File
@@ -131,7 +131,7 @@ void AddressBookService::addContactToGroup( const QString &contactId, const QStr
MessageData data;
data.type = "ContactAddToGroup";
data.value = groupId;
data.value = QStringList() << contactId << groupId;
sendSecureRequest( new SoapMessage( SERVICE_URL_ADDRESSBOOK,
"http://www.msn.com/webservices/AddressBook/ABGroupContactAdd",
@@ -299,7 +299,7 @@ void AddressBookService::contactUpdate( ContactProperty property, const QString
void AddressBookService::deleteContact( const QString &contactId )
void AddressBookService::deleteContact( const QString &contactId, const QString &handle )
{
QString body( "<ABContactDelete xmlns=\"http://www.msn.com/webservices/AddressBook\">\n"
" <abId>00000000-0000-0000-0000-000000000000</abId>\n"
@@ -312,7 +312,7 @@ void AddressBookService::deleteContact( const QString &contactId )
MessageData data;
data.type = "ContactDelete";
data.value = contactId;
data.value = QStringList() << contactId << handle;
sendSecureRequest( new SoapMessage( SERVICE_URL_ADDRESSBOOK,
"http://www.msn.com/webservices/AddressBook/ABContactDelete",
@@ -950,12 +950,18 @@ void AddressBookService::parseSecureResult( SoapMessage *message )
emit contactAdded( handle, contactId, groupsId );
emit addressBookChanged( handle, ContactAdded );
}
else if( ! handle.isEmpty() )
{
kmWarning() << "Contact add response did not include a contact id; refreshing address book.";
retrieveAddressBook();
}
}
else if( data.type == "ContactDelete" )
{
// A contact was deleted from the AB
const QString contactId( data.value.toString() );
const QString handle (data.value.toString() );
const QStringList info ( data.value.toStringList() );
const QString contactId( info.value( 0 ) );
const QString handle ( info.value( 1 ) );
if( ! contactId.isEmpty() )
{
@@ -986,8 +992,14 @@ void AddressBookService::parseSecureResult( SoapMessage *message )
{
// A contact was added to a group
const QString groupId ( data.value.toString() );
const QString contactId( body.elementsByTagName( "guid" ).item(0).toElement().text() );
const QStringList info( data.value.toStringList() );
QString contactId( body.elementsByTagName( "guid" ).item(0).toElement().text() );
const QString groupId( info.value( 1 ) );
if( contactId.isEmpty() )
{
contactId = info.value( 0 );
}
if( ! contactId.isEmpty() && ! groupId.isEmpty() )
{
@@ -1020,6 +1032,11 @@ void AddressBookService::parseSecureResult( SoapMessage *message )
emit groupAdded( groupId, name );
emit addressBookChanged( groupId, GroupAdded );
}
else if( ! name.isEmpty() )
{
kmWarning() << "Group add response did not include a group id; refreshing address book.";
retrieveAddressBook();
}
}
else if( data.type == "GroupDelete" )
{
@@ -1030,7 +1047,7 @@ void AddressBookService::parseSecureResult( SoapMessage *message )
if( ! groupId.isEmpty() )
{
emit groupDeleted( groupId, name );
emit addressBookChanged( name, GroupDeleted );
emit addressBookChanged( groupId, GroupDeleted );
}
}
else if( data.type == "GroupRename" )
@@ -1043,7 +1060,7 @@ void AddressBookService::parseSecureResult( SoapMessage *message )
if( ! groupId.isEmpty() && ! name.isEmpty() )
{
emit groupRenamed( groupId, name );
emit addressBookChanged( name, GroupRenamed );
emit addressBookChanged( groupId, GroupRenamed );
}
}
else
+1 -1
View File
@@ -73,7 +73,7 @@ class AddressBookService : public PassportLoginService
// Put the Soap action to update the information about contact
void contactUpdate( ContactProperty property, const QString &newValue );
// Delete contact
void deleteContact( const QString &contactId );
void deleteContact( const QString &contactId, const QString &handle );
// Delete contact from group
void deleteContactFromGroup( const QString &contactId, const QString &groupId );
// Delete group
+19 -1
View File
@@ -335,7 +335,6 @@ void HttpSoapConnection::sendNextRequest()
request.setHeader ( QNetworkRequest::ContentLengthHeader, contents.size() );
request.setRawHeader( "Accept", "*/*" );
request.setRawHeader( "User-Agent", "KMess/" KMESS_VERSION );
request.setRawHeader( "Connection", "Keep-Alive" );
request.setRawHeader( "Cache-Control", "no-cache" );
#ifdef KMESSTEST
@@ -459,6 +458,24 @@ void HttpSoapConnection::slotRequestFinished( QNetworkReply *reply )
const QString error ( reply->attribute( QNetworkRequest::HttpReasonPhraseAttribute ).toString() );
QUrl redirectUrl = reply->attribute( QNetworkRequest::RedirectionTargetAttribute ).toUrl();
if( statusCode == 404
&& currentRequest_->getEndPoint().contains( "storageservice/SchematizedStore.asmx", Qt::CaseInsensitive )
&& currentRequest_->getAction().endsWith( "/GetProfile" )
&& replyContents.isEmpty() )
{
kmWarning() << "Storage profile not available on the server; continuing without roaming profile data.";
reply->abort();
reply->deleteLater();
delete currentRequest_;
currentRequest_ = 0;
isSending_ = false;
QTimer::singleShot( 250, this, SLOT(sendNextRequest()) );
return;
}
#ifdef KMESSDEBUG_HTTPSOAPCONNECTION_GENERAL
bool requestSuccess = false;
const QUrl replyUrl( reply->url() );
@@ -582,6 +599,7 @@ void HttpSoapConnection::slotRequestFinished( QNetworkReply *reply )
kmWarning() << "Request endpoint:" << currentRequest_->getEndPoint()
<< "SOAPAction:" << currentRequest_->getAction()
<< "request-size:" << currentRequest_->getMessage().size()
<< "reply-url:" << reply->url()
<< "redirect:" << redirectUrl
<< "content-type:" << reply->header( QNetworkRequest::ContentTypeHeader ).toString();
kmWarning() << "Reply contents:";
+7 -3
View File
@@ -828,6 +828,10 @@ void PassportLoginService::sendSecureRequest( SoapMessage *message, const QStrin
kmDebug() << "Token is valid, adding it to the request.";
#endif
const QString requestTokenValue( requiredTokenName == "Storage" && tokenValue.startsWith( "t=" )
? tokenValue.left( 22 )
: tokenValue );
// Insert the token value within the SOAP message header
QDomNodeList list;
QDomElement header( message->getHeader().toElement() );
@@ -863,11 +867,11 @@ void PassportLoginService::sendSecureRequest( SoapMessage *message, const QStrin
// If there is a child text node, simply replace its text
if( item.firstChild().nodeType() == QDomNode::TextNode )
{
item.firstChild().toText().setNodeValue( tokenValue );
item.firstChild().toText().setNodeValue( requestTokenValue );
}
else
{
QDomText text( item.ownerDocument().createTextNode( tokenValue ) );
QDomText text( item.ownerDocument().createTextNode( requestTokenValue ) );
item.appendChild( text );
}
break;
@@ -879,7 +883,7 @@ void PassportLoginService::sendSecureRequest( SoapMessage *message, const QStrin
#ifdef KMESSDEBUG_PASSPORTLOGINSERVICE
kmDebug() << "Ticket tag found!";
#endif
item.setAttribute( "passport", tokenValue );
item.setAttribute( "passport", requestTokenValue );
break;
}
}
+1 -1
View File
@@ -37,7 +37,7 @@
/**
* @brief URL of the Storage Service
*/
#define SERVICE_URL_STORAGE_SERVICE "https://m1.escargot.log1p.xyz/storageservice/SchematizedStore.asmx"
#define SERVICE_URL_STORAGE_SERVICE "https://ds.escargot.nina.chat/storageservice/SchematizedStore.asmx"
static QDateTime parseServerIsoDate( const QString &value )
{
+10 -1
View File
@@ -785,6 +785,12 @@ QString KMessShared::htmlUnescape( const QString &string )
*/
void KMessShared::openBrowser( const QUrl &url )
{
if( url.isEmpty() || ! url.isValid() )
{
kmWarning() << "Refusing to open invalid URL:" << url;
return;
}
// Open the options
KConfigGroup group = KMessConfig::instance()->getGlobalConfig( "General" );
@@ -842,7 +848,10 @@ void KMessShared::openBrowser( const QUrl &url )
#ifdef KMESSDEBUG_SHARED_OPENEXTERNAL
kmDebug() << "KDE default browser selected.";
#endif
QDesktopServices::openUrl( url );
if( ! QDesktopServices::openUrl( url ) )
{
kmWarning() << "Unable to open URL with the desktop services:" << url;
}
return;
}
+6 -3
View File
@@ -496,10 +496,10 @@ void RichTextParser::parseMsnPlusString( QString &text )
* @param showFormatting Whether to show or strip away MSN+ formatting tags
* @param allowEmoticonLinks If false, the parser will never add links for adding an emoticon (such as for the chat history dialog)
* @param handle If not null or empty, custom emoticons of this contact will be parsed
* @param pendingEmoticonTags If the handle is specified, this must be too: this is a list of pending
* @param pendingEmoticonTags If the handle is specified, this can be set too: this is a list of pending
* custom emoticons which the contact specified by <code>handle</code> has sent to us.
*/
void RichTextParser::parseMsnString( QString &text, bool showEmoticons, bool showSmallEmoticons, bool showLinks, bool showFormatting, bool allowEmoticonLinks, const QString &handle, QStringList &pendingEmoticonTags )
void RichTextParser::parseMsnString( QString &text, bool showEmoticons, bool showSmallEmoticons, bool showLinks, bool showFormatting, bool allowEmoticonLinks, const QString &handle, QStringList *pendingEmoticonTags )
{
// Remove all HTML
KMessShared::htmlEscape( text );
@@ -833,7 +833,10 @@ void RichTextParser::parseMsnString( QString &text, bool showEmoticons, bool sho
}
placeholderId = "ce" + QString::number( ++lastPendingEmoticonId_ );
pendingEmoticonTags.append( placeholderId );
if( pendingEmoticonTags != nullptr )
{
pendingEmoticonTags->append( placeholderId );
}
// Insert placeholder
matched = regexp->cap( 0 );
+1 -1
View File
@@ -81,7 +81,7 @@ class RichTextParser
// Initialize the class
static void initialize();
// Return the given string with links and emoticons translated to HTML
static void parseMsnString( QString &text, bool showEmoticons = true, bool showSmallEmoticons = true, bool showLinks = true, bool showFormatting = false, bool allowEmoticonLinks = true, const QString &handle = *((QString*)0), QStringList &pendingEmoticonTags = *((QStringList*)0) );
static void parseMsnString( QString &text, bool showEmoticons = true, bool showSmallEmoticons = true, bool showLinks = true, bool showFormatting = false, bool allowEmoticonLinks = true, const QString &handle = QString(), QStringList *pendingEmoticonTags = nullptr );
private: // Private static methods