Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RoomPinnedEventsEvent instead of the old name #680

Merged
merged 1 commit into from
Jul 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Quotient/room.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ QString Room::canonicalAlias() const
QString Room::displayName() const { return d->displayname; }

QStringList Room::pinnedEventIds() const {
return currentState().queryOr(&RoomPinnedEvent::pinnedEvents, QStringList());
return currentState().content<RoomPinnedEventsEvent>().value;
}

QVector<const Quotient::RoomEvent*> Quotient::Room::pinnedEvents() const
Expand Down Expand Up @@ -2327,7 +2327,7 @@ void Room::setCanonicalAlias(const QString& newAlias)

void Room::setPinnedEvents(const QStringList& events)
{
setState<RoomPinnedEvent>(events);
setState<RoomPinnedEventsEvent>(events);
}
void Room::setLocalAliases(const QStringList& aliases)
{
Expand Down Expand Up @@ -3185,7 +3185,7 @@ Room::Change Room::Private::processStateEvent(const RoomEvent& curEvent,
connection->updateRoomAliases(id, previousAltAliases, newAliases);
return Change::RoomNames;
},
[this](const RoomPinnedEvent&) {
[this](const RoomPinnedEventsEvent&) {
emit q->pinnedEventsChanged();
return Change::Other;
},
Expand Down