fix: Check whether redacted event is pinned before unpinning
This commit is contained in:
parent
50c6e0b211
commit
c556b2f5b6
1 changed files with 2 additions and 1 deletions
|
|
@ -855,7 +855,8 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
future: () async {
|
||||
if (event.status.isSent) {
|
||||
if (event.canRedact) {
|
||||
if (room.canChangeStateEvent(EventTypes.RoomPinnedEvents)) {
|
||||
if (room.pinnedEventIds.contains(event.eventId) &&
|
||||
room.canChangeStateEvent(EventTypes.RoomPinnedEvents)) {
|
||||
final pinnedEvents = room.pinnedEventIds
|
||||
.where((e) => e != event.eventId)
|
||||
.toList();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue