                                     notificationBody = NSString.localizedUserNotificationString(forKey: "USER_MEMBERSHIP_UPDATED", arguments: [eventSenderName])
                                 }
                             // Otherwise treat the notification as an invite.
+                            // This is the expected notification content for a membership event.
                             } else {
                                 if roomDisplayName != nil && roomDisplayName != eventSenderName {
                                     notificationBody = NSString.localizedUserNotificationString(forKey: "USER_INVITE_TO_NAMED_ROOM", arguments: [eventSenderName, roomDisplayName as Any])

                                // Otherwise show a generic reaction.
                                notificationBody = NSString.localizedUserNotificationString(forKey: "GENERIC_REACTION_FROM_USER", arguments: [eventSenderName])
                            }
                        case .custom:
                            if (event.type == kWidgetMatrixEventTypeString || event.type == kWidgetModularEventTypeString),
                               let type = event.content?["type"] as? String,

                            }
                        case .roomMember:
                            // If the current user is already joined, display updated displayname/avatar events.
                            // This is an unexpected path, but has been seen in some circumstances.
                            if NotificationService.backgroundSyncService.roomSummary(forRoomId: roomId)?.membership == .join {
                                notificationTitle = self.messageTitle(for: eventSenderName, in: roomDisplayName)
                                
