This method is a bit dangerous if the room is encrypted, e.g. people can send events before the room state has been fetched and thus accidentally send out unencrypted events in an encrypted room.