[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenetwork/kopete/kopete
From: Will Stephenson <lists () stevello ! free-online ! co ! uk>
Date: 2004-10-24 22:26:54
Message-ID: 20041024222654.EE12F16C2B () office ! kde ! org
[Download RAW message or body]
CVS commit by wstephens:
Fix TODO so that if messageContact is called with a message argument, that message is sent immediately.
CCMAIL: cap@capsi.com
M +9 -3 kimifaceimpl.cpp 1.19
--- kdenetwork/kopete/kopete/kimifaceimpl.cpp #1.18:1.19
@@ -30,4 +30,5 @@
#include "kopeteaccountmanager.h"
#include "kopetecontactlist.h"
+#include "kopetemessagemanager.h"
#include "kopetemetacontact.h"
#include "kopeteprotocol.h"
@@ -267,9 +268,14 @@ QStringList KIMIfaceImpl::protocols()
void KIMIfaceImpl::messageContact( const QString &uid, const QString& messageText )
{
- // TODO: make it possible to specify the message here
- Q_UNUSED( messageText );
Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid );
if ( m )
- m->sendMessage();
+ {
+ Kopete::Contact * c = m->preferredContact();
+ Kopete::MessageManager * manager = c->manager(true);
+ c->manager( true )->view( true );
+ Kopete::Message msg = Kopete::Message( manager->user(), manager->members(), messageText,
+ Kopete::Message::Outbound, Kopete::Message::PlainText);
+ manager->sendMessage( msg );
+ }
else
unknown( uid );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic