Diff

doc/example_jingle.lua @ 144:46e933d81024

docs/example_jingle.lua: Update to use content.type instead of content.name for checking the kind of content we're receiving
author Matthew Wild <mwild1@gmail.com>
date Fri, 17 Sep 2010 16:42:50 +0100
parent 110:3fca7dd127df
child 260:7f6df45a3d1f
line wrap: on
line diff
--- a/doc/example_jingle.lua	Fri Sep 17 16:40:07 2010 +0100
+++ b/doc/example_jingle.lua	Fri Sep 17 16:42:50 2010 +0100
@@ -40,7 +40,7 @@
 	
 	-- Handle incoming Jingle requests
 	c:hook("jingle", function (jingle)
-		if jingle.content.name == "file" then
+		if jingle.content.type == "file" then
 			print("File offer from "..jingle.peer.."!");
 			print("Filename: "..jingle.content.file.name.." Size: "..jingle.content.file.size);
 			jingle:accept({ save_file = jingle.content.file.name..".received" });