Changeset View
Changeset View
Standalone View
Standalone View
src/matrix-room.cpp
| Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | MatrixRoom::~MatrixRoom() { | ||||
| updateLocalDraftNow(); | updateLocalDraftNow(); | ||||
| } | } | ||||
| MatrixRoomTimeline *MatrixRoom::timeline() const | MatrixRoomTimeline *MatrixRoom::timeline() const | ||||
| { | { | ||||
| return new MatrixRoomTimeline(m_room); | return new MatrixRoomTimeline(m_room); | ||||
| } | } | ||||
| MatrixRoomTimeline *MatrixRoom::pinnedEventsTimeline() const | |||||
| { | |||||
| return new MatrixRoomTimeline( | |||||
| m_room.pinnedEvents(), | |||||
| m_room.messagesMap(), | |||||
| lager::make_constant(immer::flex_vector<LocalEchoDesc>()), | |||||
| lager::make_constant(immer::map<std::string, std::string>()), | |||||
| m_room | |||||
| ); | |||||
| } | |||||
| static void maybeAddRelations(nlohmann::json &msg, const QString &relType, const QString &relatedTo) | static void maybeAddRelations(nlohmann::json &msg, const QString &relType, const QString &relatedTo) | ||||
| { | { | ||||
| if (relatedTo.isEmpty()) { | if (relatedTo.isEmpty()) { | ||||
| return; | return; | ||||
| } | } | ||||
| if (relType == "m.in_reply_to") { | if (relType == "m.in_reply_to") { | ||||
| msg["content"]["m.relates_to"] = nlohmann::json{ | msg["content"]["m.relates_to"] = nlohmann::json{ | ||||
| ▲ Show 20 Lines • Show All 392 Lines • Show Last 20 Lines | |||||