Software /
code /
prosody
Comparison
plugins/mod_pubsub/pubsub.lib.lua @ 8296:e23328adca25
mod_pubsub: Remove workaround for SQL issue (fixed in becb593ed86d)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 08 Oct 2017 01:23:43 +0200 |
parent | 8295:8e82aa858ed2 |
child | 8298:dd9fa511494a |
comparison
equal
deleted
inserted
replaced
8295:8e82aa858ed2 | 8296:e23328adca25 |
---|---|
354 }); | 354 }); |
355 if not data then | 355 if not data then |
356 module:log("error", "Unable to get item: %s", err); | 356 module:log("error", "Unable to get item: %s", err); |
357 return nil, err; | 357 return nil, err; |
358 end | 358 end |
359 -- Workaround for buggy SQL drivers which require iterating until we get a nil. | 359 local id, payload, when, publisher = data(); |
360 local id, payload, when, publisher; | |
361 for a, b, c, d in data do | |
362 id, payload, when, publisher = a, b, c, d; | |
363 end | |
364 module:log("debug", "Get item %s (published at %s by %s) from store %s", id, when, publisher, store); | 360 module:log("debug", "Get item %s (published at %s by %s) from store %s", id, when, publisher, store); |
365 if id == nil then | 361 if id == nil then |
366 return nil; | 362 return nil; |
367 end | 363 end |
368 return create_encapsulating_item(id, payload, publisher, expose_publisher); | 364 return create_encapsulating_item(id, payload, publisher, expose_publisher); |