Mercurial > prosody-modules
comparison mod_slack_webhooks/mod_slack_webhooks.lua @ 3094:39d714abbc2b
mod_slack_webhooks: Split long line to improve readability [luacheck]
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 02 Jun 2018 14:59:09 +0200 |
| parents | 7ed0589eff3c |
| children | 3a6a48b83b4f |
comparison
equal
deleted
inserted
replaced
| 3093:7ed0589eff3c | 3094:39d714abbc2b |
|---|---|
| 49 | 49 |
| 50 if not routing[from_room] then | 50 if not routing[from_room] then |
| 51 return; | 51 return; |
| 52 end | 52 end |
| 53 | 53 |
| 54 local json_out = {channel_name = from_room, timestamp = now(), text = body, team_domain = from_host, user_name = from_nick}; | 54 local json_out = { |
| 55 channel_name = from_room, | |
| 56 timestamp = now(), | |
| 57 text = body, | |
| 58 team_domain = from_host, | |
| 59 user_name = from_nick, | |
| 60 }; | |
| 55 local stanzaid = stanza:get_child("id"); | 61 local stanzaid = stanza:get_child("id"); |
| 56 if stanzaid and string.sub(stanzaid,1,string.len("webhookbot"))=="webhookbot" then | 62 if stanzaid and string.sub(stanzaid,1,string.len("webhookbot"))=="webhookbot" then |
| 57 json_out["bot_id"] = "webhookbot"; | 63 json_out["bot_id"] = "webhookbot"; |
| 58 end | 64 end |
| 59 | 65 |
