mod_tweet_data/mod_tweet_data.lua
changeset 4705 efdc3e4dc5df
parent 4601 c858c76d0845
equal deleted inserted replaced
4704:f821eeac0e50 4705:efdc3e4dc5df
    23 				return;
    23 				return;
    24 			end
    24 			end
    25 
    25 
    26 			local response = json.decode(response_body);
    26 			local response = json.decode(response_body);
    27 			if not response then return; end
    27 			if not response then return; end
       
    28 			if not response['data'] or not response['includes'] then return; end
    28 
    29 
    29 			local tweet = response['data'];
    30 			local tweet = response['data'];
    30 			local author = response['includes']['users'][1];
    31 			local author = response['includes']['users'][1];
    31 
    32 
    32 			local to = room.jid
    33 			local to = room.jid