I came across the following in Wikipedia.
In July 1830, Joseph Smith, Jr., founder of the Latter Day Saint Movement, dictated his first revelation referencing the practice, said to be the words of Jesus directed to Smith and Oliver Cowdery, directing them as follows:
"And in whatsoever place ye shall enter, and they receive you not, in my name ye shall leave a cursing instead of a blessing, by casting off the dust of your feet against them as a testimony, and cleansing your feet by the wayside." (Phelps 1833, p. 57)*
In 1831, a revelation clarified that when leaving a cursing upon a person in this way, the shaking of dust and washing of feet should be performed "not in their presence, lest thou provoke them, but in secret." (Phelps 1833, p. 144).
On January 25, 1832, one of Smith's revelations directed several missionaries to use the practice, and indicated that when performed against a house, the missionaries:
"shall be filled with joy and gladness and know this, that in the day of judgment you shall be judges of that house, and condemn them, and it shall be more tolerable for the heathen in the day of judgment, than for that house." (Smith et al. 1835, p. 222).**
After referring again to the practice in an August 29, 1832 revelation (Smith et al. 1835, p. 206), Smith gave his final revelation on the subject on September 22-23, 1832. This revelation, directed to those ordained to the newly established high priesthood, indicating that when a person does not receive a traveling high priest, or give them food, clothing, or money, they should
"go away from him alone by yourselves, and cleanse your feet, even with water, pure water, whether in heat or in cold, and bear testimony of it unto your Father, and return not again unto that man. And in whatsoever village or city ye enter, do likewise." (Smith et al. 1835, p. 93).***
I didn't see scriptural references noted as such, so I am including what these quotes can be found in LDS scripture.
20 And in whatsoever house ye enter, and they receive you not, ye shall depart speedily from that house, and shake off the dust of your feet as a testimony against them.
21 And you shall be filled with joy and gladness; and know this, that in the day of judgment you shall be judges of that house, and condemn them;
22 And it shall be more tolerable for the heathen in the day of judgment, than for that house; therefore, gird up your loins and be faithful, and ye shall overcome all things, and be lifted up at the last day. Even so. Amen.
Why would "sealing" these people up to judgement or cursing them cause misionaries to be filled with joy? I would think that they would instead be filled with sorrow for them.