# HG changeset patch # User Kim Alvefur # Date 1300210371 -3600 # Node ID 830baad98c9ad9250d78d73e099aa5e0aaea4d43 # Parent 4b5f9a50ae68d76c676db76fa0156ffca1393e4a clix.roster: Show incomming subscription requests when --presence is used diff -r 4b5f9a50ae68 -r 830baad98c9a clix/roster.lua --- a/clix/roster.lua Tue Mar 15 18:29:24 2011 +0100 +++ b/clix/roster.lua Tue Mar 15 18:32:51 2011 +0100 @@ -125,6 +125,15 @@ conn:hook("roster/item-changed", notif("changed")); conn:hook("roster/item-removed", notif("removed")); end + if opts.presence then + conn:hook("presence", function(presence) + if presence.attr.type == "subscribe" then + print(("%s wants to subscribe to you"):format(presence.attr.from)); + --elseif presence.attr.type == "subscribed" then + --print(("%s subscribed to you?"):format(presence.attr.from)); + end + end) + end end clix_connect(opts, on_connect); end