src_prepare-overlay/net-im/spectral/files/libQuotient-0.6.patch-1.patch

53 lines
1.5 KiB
Diff

--- a/src/spectralroom.cpp 2020-04-16 04:44:53.000000000 +0200
+++ b/src/spectralroom.cpp 2020-07-29 05:33:32.000000000 +0200
@@ -167,7 +167,7 @@
QDateTime SpectralRoom::lastActiveTime() const {
if (timelineSize() == 0)
return QDateTime();
- return messageEvents().rbegin()->get()->timestamp();
+ return messageEvents().rbegin()->get()->originTimestamp();
}
int SpectralRoom::savedTopVisibleIndex() const {
@@ -397,30 +397,30 @@
const auto job = connection()->uploadFile(localFile.toLocalFile());
if (isJobRunning(job)) {
connect(job, &BaseJob::success, this, [this, job] {
- connection()->callApi<SetRoomStateJob>(
- id(), "m.room.avatar", QJsonObject{{"url", job->contentUri()}});
+ connection()->callApi<SetRoomStateWithKeyJob>(
+ id(), "m.room.avatar", localUser()->id(), QJsonObject{{"url", job->contentUri()}});
});
}
}
void SpectralRoom::addLocalAlias(const QString& alias) {
- auto aliases = localAliases();
- if (aliases.contains(alias))
+ auto a = aliases();
+ if (a.contains(alias))
return;
- aliases += alias;
+ a += alias;
- setLocalAliases(aliases);
+ setLocalAliases(a);
}
void SpectralRoom::removeLocalAlias(const QString& alias) {
- auto aliases = localAliases();
- if (!aliases.contains(alias))
+ auto a = aliases();
+ if (!a.contains(alias))
return;
- aliases.removeAll(alias);
+ a.removeAll(alias);
- setLocalAliases(aliases);
+ setLocalAliases(a);
}
QString SpectralRoom::markdownToHTML(const QString& markdown) {