Compare commits
1 Commits
work/redst
...
fix-editin
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bf23c491a |
@@ -741,16 +741,24 @@ void NeoChatRoom::postHtmlMessage(const QString &text, const QString &html, Mess
|
|||||||
if (isEdit) {
|
if (isEdit) {
|
||||||
QJsonObject content{{"body", text}, {"msgtype", msgTypeToString(type)}, {"format", "org.matrix.custom.html"}, {"formatted_body", html}};
|
QJsonObject content{{"body", text}, {"msgtype", msgTypeToString(type)}, {"format", "org.matrix.custom.html"}, {"formatted_body", html}};
|
||||||
if (isReply) {
|
if (isReply) {
|
||||||
content["m.relates_to"] = QJsonObject{{"m.in_reply_to", QJsonObject{{"event_id", replyEventId}}}};
|
content["m.relates_to"] =
|
||||||
|
QJsonObject {
|
||||||
|
{"m.in_reply_to",
|
||||||
|
QJsonObject {
|
||||||
|
{"event_id", replyEventId}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
QJsonObject json{{"type", "m.room.message"},
|
QJsonObject json{
|
||||||
{"msgtype", msgTypeToString(type)},
|
{"type", "m.room.message"},
|
||||||
{"body", "* " + text},
|
{"msgtype", msgTypeToString(type)},
|
||||||
{"format", "org.matrix.custom.html"},
|
{"body", "* " + text},
|
||||||
{"formatted_body", html},
|
{"format", "org.matrix.custom.html"},
|
||||||
{"m.new_content", content},
|
{"formatted_body", html},
|
||||||
{"m.relates_to", QJsonObject{{"rel_type", "m.replace"}, {"event_id", relateToEventId}}}};
|
{"m.new_content", content},
|
||||||
|
{"m.relates_to", QJsonObject{{"rel_type", "m.replace"}, {"event_id", relateToEventId}}}};
|
||||||
|
|
||||||
postJson("m.room.message", json);
|
postJson("m.room.message", json);
|
||||||
return;
|
return;
|
||||||
@@ -1431,6 +1439,7 @@ void NeoChatRoom::setPushNotificationState(PushNotificationState::State state)
|
|||||||
|
|
||||||
m_currentPushNotificationState = state;
|
m_currentPushNotificationState = state;
|
||||||
Q_EMIT pushNotificationStateChanged(m_currentPushNotificationState);
|
Q_EMIT pushNotificationStateChanged(m_currentPushNotificationState);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NeoChatRoom::updatePushNotificationState(QString type)
|
void NeoChatRoom::updatePushNotificationState(QString type)
|
||||||
|
|||||||
Reference in New Issue
Block a user