X-ray free-electron lasers (XFELs) provide extremely bright and highly spatially coherent x-ray radiation with femtosecond pulse duration. Currently, they are widely used in biology and material science. Knowledge of the XFEL statistical properties during an experiment may be vitally important for the accurate interpretation of the results. Here, for the first time, we demonstrate Hanbury Brown and Twiss (HBT) interferometry performed in diffraction mode at an XFEL source. It allowed us to determine the XFEL statistical properties directly from the Bragg peaks originating from colloidal crystals. This approach is different from the traditional one when HBT interferometry is performed in the direct beam without a sample. Our analysis has demonstrated nearly full (80%) global spatial coherence of the XFEL pulses and an average pulse duration on the order of ten femtoseconds for the monochromatized beam, which is significantly shorter than expected from the electron bunch measurements.