Messages showing twice in Spark

I’‘m having an issue with Spark when sending some automated messages both from Python and PERL. The issue seems to be that if the message type isn’‘t set, I will almost always see the message twice. It’'s not being sent twice (neither by my app nor Openfire), but is being displayed twice.

Here’‘s the message that’'s sent when I see the message twice:

To be fair, I haven’'t tried all of the various type= options.

FWIW, this is Spark 2.5.3

I’‘ll go ahead an reply to myself, since the answer was obtained during today’‘s group chat: You have to have a message type or you’'ll see these twice.