feat: unpin message on redact to avoid pinned redactions (#3373)

pull/2245/head
Kelrap 4 months ago committed by GitHub
parent 109fe3e278
commit 678e8fc414
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1375,6 +1375,15 @@ class ChatController extends State<ChatPageWithRoom>
future: () async {
if (event.status.isSent) {
if (event.canRedact) {
// #Pangea
// https://github.com/pangeachat/client/issues/3353
if (room.canChangeStateEvent(EventTypes.RoomPinnedEvents)) {
final pinnedEvents = room.pinnedEventIds
.where((e) => e != event.eventId)
.toList();
await room.setPinnedEvents(pinnedEvents);
}
// Pangea#
await event.redactEvent(reason: reason);
} else {
final client = currentRoomBundle.firstWhere(

Loading…
Cancel
Save