The president had sued the social-media company after his accounts were suspended following the Jan. 6 riot at the U.S.