Software /
code /
prosody
Comparison
plugins/mod_presence.lua @ 1209:86b01a837126
mod_presence: Leave alone the from attribute of session.presence. Big thanks to albert for figuring out the steps to reproduce this bug, and for giving us a ([very] slight) performance increase!
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 28 May 2009 02:55:14 +0100 |
parent | 1150:d71a8f28f18b |
child | 1210:342f401f354c |
comparison
equal
deleted
inserted
replaced
1208:5f992ddc9685 | 1209:86b01a837126 |
---|---|
146 if u then | 146 if u then |
147 for k, session in pairs(u.sessions) do | 147 for k, session in pairs(u.sessions) do |
148 local pres = session.presence; | 148 local pres = session.presence; |
149 if pres then | 149 if pres then |
150 pres.attr.to = jid; | 150 pres.attr.to = jid; |
151 pres.attr.from = session.full_jid; | |
152 core_route_stanza(session, pres); | 151 core_route_stanza(session, pres); |
153 pres.attr.to = nil; | 152 pres.attr.to = nil; |
154 pres.attr.from = nil; | |
155 count = count + 1; | 153 count = count + 1; |
156 end | 154 end |
157 end | 155 end |
158 end | 156 end |
159 end | 157 end |