Mercurial > prosody-modules
comparison mod_tweet_data/mod_tweet_data.lua @ 4701:efdc3e4dc5df
mod_tweet_data: Return when no tweet data returned
Can happen when a tweet is protected by its author.
author | JC Brand <jc@opkode.com> |
---|---|
date | Fri, 01 Oct 2021 16:58:37 +0200 |
parents | c858c76d0845 |
children |
comparison
equal
deleted
inserted
replaced
4700:f821eeac0e50 | 4701: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 |