Software /
code /
verse
Comparison
plugins/smacks.lua @ 202:05d1a4751251
plugins.smacks: Fix event priority and handling to make the code actually... work
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 18 Mar 2011 21:46:33 +0000 |
parent | 201:1fce24cb2c41 |
child | 203:0f34520f4e26 |
comparison
equal
deleted
inserted
replaced
201:1fce24cb2c41 | 202:05d1a4751251 |
---|---|
82 if features:get_child("sm", xmlns_sm) then | 82 if features:get_child("sm", xmlns_sm) then |
83 stream.stream_management_supported = true; | 83 stream.stream_management_supported = true; |
84 if stream.smacks and stream.bound then -- Already enabled in a previous session - resume | 84 if stream.smacks and stream.bound then -- Already enabled in a previous session - resume |
85 stream:send(verse.stanza("resume", { xmlns = xmlns_sm, | 85 stream:send(verse.stanza("resume", { xmlns = xmlns_sm, |
86 h = handled_stanza_count, previd = stream.resumption_token })); | 86 h = handled_stanza_count, previd = stream.resumption_token })); |
87 return true; | |
87 else | 88 else |
88 stream:hook("bind-success", on_bind_success); | 89 stream:hook("bind-success", on_bind_success, 1); |
89 end | 90 end |
90 return true; | |
91 end | 91 end |
92 end | 92 end |
93 | 93 |
94 stream:hook("stream-features", on_features, 150); | 94 stream:hook("stream-features", on_features, 250); |
95 stream:hook("stream/"..xmlns_sm, handle_sm_command); | 95 stream:hook("stream/"..xmlns_sm, handle_sm_command); |
96 --stream:hook("ready", on_stream_ready, 500); | 96 --stream:hook("ready", on_stream_ready, 500); |
97 end | 97 end |