]> granicus.if.org Git - ejabberd/commitdiff
PubSub: Add missing Nidx building records from sql result
authorChristophe Romain <christophe.romain@process-one.net>
Wed, 13 Dec 2017 10:35:36 +0000 (11:35 +0100)
committerChristophe Romain <christophe.romain@process-one.net>
Wed, 13 Dec 2017 10:35:36 +0000 (11:35 +0100)
src/node_flat_sql.erl

index afbc050a8f3f4738b09292502b5d828ea9b9ca63..2773114a21babc6d6bd917d5c6d0e8887a793526 100644 (file)
@@ -591,6 +591,7 @@ get_states(Nidx) ->
               fun({SJID, Aff, Subs}) ->
                       JID = decode_jid(SJID),
                       #pubsub_state{stateid = {JID, Nidx},
+                                    nodeidx = Nidx,
                                     items = itemids(Nidx, JID),
                                     affiliation = decode_affiliation(Aff),
                                     subscriptions = decode_subscriptions(Subs)}
@@ -997,6 +998,7 @@ raw_to_item(Nidx, {ItemId, SJID, Creation, Modification, XML}) ->
        El -> [El]
     end,
     #pubsub_item{itemid = {ItemId, Nidx},
+       nodeidx = Nidx,
        creation = {decode_now(Creation), jid:remove_resource(JID)},
        modification = {decode_now(Modification), JID},
        payload = Payload}.