Skip to content

Commit

Permalink
Merge #858(kitsune): Minor fixes - 0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
KitsuneRal authored Jan 24, 2025
2 parents adf69bc + 0fca50c commit 93a694f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Quotient/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ QFuture<void> Connection::logout()
emit stateChanged();

QFutureInterface<void> p;
p.reportStarted();
connect(d->logoutJob.get(), &BaseJob::finished, this, [this, wasSyncing, p]() mutable {
if (d->logoutJob->status().good()
|| d->logoutJob->error() == BaseJob::Unauthorised
Expand Down Expand Up @@ -710,6 +711,7 @@ QUrl Connection::makeMediaUrl(QUrl mxcUrl) const
{
Q_ASSERT(mxcUrl.scheme() == "mxc"_L1);
QUrlQuery q(mxcUrl.query());
q.removeAllQueryItems(u"user_id"_s);
q.addQueryItem(u"user_id"_s, userId());
mxcUrl.setQuery(q);
return mxcUrl;
Expand Down
6 changes: 4 additions & 2 deletions Quotient/room.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1416,8 +1416,10 @@ QUrl Room::makeMediaUrl(const QString& eventId, const QUrl& mxcUrl) const
auto url = connection()->makeMediaUrl(mxcUrl);
QUrlQuery q(url.query());
Q_ASSERT(q.hasQueryItem("user_id"_L1));
q.addQueryItem("room_id"_L1, id());
q.addQueryItem("event_id"_L1, eventId);
q.removeAllQueryItems(u"room_id"_s);
q.addQueryItem(u"room_id"_s, id());
q.removeAllQueryItems(u"event_id"_s);
q.addQueryItem(u"event_id"_s, eventId);
url.setQuery(q);
return url;
}
Expand Down

0 comments on commit 93a694f

Please sign in to comment.