Abbasid Caliphs as negotiators in a time of decline