Merge c556b2f5b6 into eea4e431b4
This commit is contained in:
commit
8aaaa0575b
1 changed files with 7 additions and 0 deletions
|
|
@ -884,6 +884,13 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
onProgress(i / count);
|
||||
if (event.status.isSent) {
|
||||
if (event.canRedact) {
|
||||
if (room.pinnedEventIds.contains(event.eventId) &&
|
||||
room.canChangeStateEvent(EventTypes.RoomPinnedEvents)) {
|
||||
final pinnedEvents = room.pinnedEventIds
|
||||
.where((e) => e != event.eventId)
|
||||
.toList();
|
||||
await room.setPinnedEvents(pinnedEvents);
|
||||
}
|
||||
await event.redactEvent(reason: reason);
|
||||
} else {
|
||||
final client = currentRoomBundle.firstWhere(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue