Software /
code /
verse
Changeset
476:c34b263499be
presence: Clone stanza before caching it
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 17 Mar 2023 11:18:39 +0000 |
parents | 475:68a4fb45afbc |
children | 477:b0a8d4e9934e |
files | plugins/presence.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/presence.lua Fri Mar 17 11:15:18 2023 +0000 +++ b/plugins/presence.lua Fri Mar 17 11:18:39 2023 +0000 @@ -1,11 +1,13 @@ local verse = require "verse"; +local st = require "util.stanza"; function verse.plugins.presence(stream) stream.last_presence = nil; stream:hook("presence-out", function (presence) if not presence.attr.to then - stream.last_presence = presence; -- Cache non-directed presence + -- Clone so we don't add stuff over and over..? + stream.last_presence = st.clone(presence); -- Cache non-directed presence end end, 1);