When planning its October 7 attacks, Hamas must have expected the furious Israeli bombing of Gaza and hoped that this would put the militant group itself, its goals and Palestine back on the global agenda.