forked from blue/squawk
initial functionality of mucs
This commit is contained in:
parent
e2cc1bae2e
commit
023494de0b
23 changed files with 347 additions and 119 deletions
|
@ -97,7 +97,6 @@ void Conversation::setName(const QString& name)
|
|||
{
|
||||
m_ui->nameLabel->setText(name);
|
||||
setWindowTitle(name);
|
||||
line->setPalName(getJid(), name);
|
||||
}
|
||||
|
||||
QString Conversation::getAccount() const
|
||||
|
@ -119,13 +118,6 @@ void Conversation::addMessage(const Shared::Message& data)
|
|||
if (place == MessageLine::invalid) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data.getOutgoing()) {
|
||||
const QString& res = data.getPenPalResource();
|
||||
if (res.size() > 0) {
|
||||
setPalResource(res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
KeyEnterReceiver::KeyEnterReceiver(QObject* parent): QObject(parent), ownEvent(false) {}
|
||||
|
@ -173,17 +165,7 @@ void Conversation::onEnterPressed()
|
|||
|
||||
if (body.size() > 0) {
|
||||
m_ui->messageEditor->clear();
|
||||
Shared::Message msg(Shared::Message::chat);
|
||||
msg.setFromJid(myJid);
|
||||
msg.setFromResource(myResource);
|
||||
msg.setToJid(palJid);
|
||||
msg.setToResource(activePalResource);
|
||||
msg.setBody(body);
|
||||
msg.setOutgoing(true);
|
||||
msg.generateRandomId();
|
||||
msg.setCurrentTime();
|
||||
addMessage(msg);
|
||||
emit sendMessage(msg);
|
||||
handleSendMessage(body);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue