forked from blue/squawk
now it's possible to fix your messages
This commit is contained in:
parent
bf4a27f35d
commit
788c6ca556
13 changed files with 204 additions and 85 deletions
|
@ -497,6 +497,17 @@ void Squawk::onConversationMessage(const Shared::Message& msg)
|
|||
emit sendMessage(acc, msg);
|
||||
}
|
||||
|
||||
void Squawk::onConversationReplaceMessage(const QString& originalId, const Shared::Message& msg)
|
||||
{
|
||||
Conversation* conv = static_cast<Conversation*>(sender());
|
||||
QString acc = conv->getAccount();
|
||||
|
||||
rosterModel.changeMessage(acc, msg.getPenPalJid(), originalId, {
|
||||
{"state", static_cast<uint>(Shared::Message::State::pending)}
|
||||
});
|
||||
emit replaceMessage(acc, originalId, msg);
|
||||
}
|
||||
|
||||
void Squawk::onConversationResend(const QString& id)
|
||||
{
|
||||
Conversation* conv = static_cast<Conversation*>(sender());
|
||||
|
@ -958,6 +969,7 @@ void Squawk::subscribeConversation(Conversation* conv)
|
|||
{
|
||||
connect(conv, &Conversation::destroyed, this, &Squawk::onConversationClosed);
|
||||
connect(conv, &Conversation::sendMessage, this, &Squawk::onConversationMessage);
|
||||
connect(conv, &Conversation::replaceMessage, this, &Squawk::onConversationReplaceMessage);
|
||||
connect(conv, &Conversation::resendMessage, this, &Squawk::onConversationResend);
|
||||
connect(conv, &Conversation::notifyableMessage, this, &Squawk::notify);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue