D&C 131:7 tells us
There is no such thing as immaterial matter. All spirit is matter, but it is more fine or pure, and can only be discerned by purer eyes.
All spirit is matter and thus has mass.
Next, let us get a better understanding of spirit matter. In the Book of Mormon, there is a clear and explicit account of a man, known as "the Brother of Jared", talking with Jesus Christ, the Jehovah of the Old Testament, who at that time was a spirit. From this experience, we learn that bodies of spirit matter look like bodies of flesh and bone. The brother of Jared saw the spirit body of Jesus prior to Jesus being born of Mary, and he thought the body was flesh and blood; Jesus corrected him and explained it was the body of his spirit. Then Jesus said
Behold, this body, which ye now behold, is the body of my spirit; and man have I created after the body of my spirit; and even as I appear unto thee to be in the spirit will I appear unto my people in the flesh. (Ether 3:16)
Now, we have a little better idea of what Joseph Smith meant when he said spirit is matter but is more refined and pure than mortal matter.