Don't save duplicate messages into a user's packed inbox. We've already got the packed box loaded at insert time, so we can simply unpack it and check before doing the update query. Should help with dupes that come in when inbox distrib jobs die and get restarted, etc.
Don't save duplicate messages into a user's packed inbox. We've already got the packed box loaded at insert time, so we can simply unpack it and check before doing the update query.
Should help with dupes that come in when inbox distrib jobs die and get restarted, etc.

Conflicts:

	classes/Inbox.php

Looks like this was implemented on master recently and not copied up to testing. Merging to my version on testing as I've added some doc comments and extracted a couple functions for future ease of use.

csarven/statusnet,chimo/social,brion/StatusNet,gnusocial/mainline,zcopley/StatusNet,Piratas/tortuga,minmb/statusnet,zh/statusnet,d3vgru/StatusNet,UngPirat/freesocial,furtherfield/gnu-social,minmb/statusnet,charnimda/lgbtpzn-social,eXcomm/gnu-social,Piratas/tortuga,studio666/gnu-social,eXcomm/gnu-social,csarven/statusnet,zcopley/zcopleys-statusnet-clone,bankonme/gnu-social,zcopley/zcopleys-statusnet-clone,znarf/statusnet-ladistribution,eXcomm/gnu-social,bankonme/gnu-social,eXcomm/gnu-social,foocorp/gnu-social,zcopley/StatusNet,zcopley/StatusNet,furtherfield/gnu-social,charlycoste/StatusNet,faulteh/gnu-social,faulteh/gnu-social,shashi/StatusNet,d3vgru/StatusNet,csarven/statusnet,brion/StatusNet,bankonme/gnu-social,charnimda/lgbtpzn-social,charlycoste/StatusNet,gnusocial/mainline,faulteh/gnu-social,studio666/gnu-social,Piratas/tortuga,sikevux/bsk-social,faulteh/gnu-social,zcopley/zcopleys-statusnet-clone,csarven/statusnet,chimo/social,xebia/statusnet-oauth2,foocorp/gnu-social,furtherfield/gnu-social,brion/StatusNet,minmb/statusnet,gnusocial/mainline,znarf/statusnet-ladistribution,xebia/statusnet-oauth2,znarf/statusnet-ladistribution,bankonme/gnu-social,gnusocial/mainline,xebia/statusnet-oauth2,foocorp/gnu-social,shashi/StatusNet,d3vgru/StatusNet,UngPirat/freesocial,charlycoste/StatusNet,zh/statusnet,sikevux/bsk-social,sikevux/bsk-social,studio666/gnu-social,Piratas/tortuga,chimo/social,charnimda/lgbtpzn-social,furtherfield/gnu-social,studio666/gnu-social,sikevux/bsk-social,zh/statusnet,shashi/StatusNet,UngPirat/freesocial