mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-02 16:37:52 +01:00
does not write item when max_items set to 0 (solves EJAB-768)
SVN Revision: 1660
This commit is contained in:
parent
a2b8263a20
commit
26cf780476
@ -6,6 +6,9 @@
|
||||
* src/mod_pubsub/mod_pubsub.erl: fix remove_user not unsubscribing
|
||||
user (EJAB-684)
|
||||
|
||||
* src/mod_pubsub/node_default.erl: does not write item when max_items
|
||||
set to 0 (solves EJAB-768)
|
||||
|
||||
2008-10-13 Jerome Sautret <jerome.sautret@process-one.net>
|
||||
|
||||
* src/odbc/ejabberd_odbc.erl: log MySQL driver messages.
|
||||
|
@ -452,10 +452,12 @@ publish_item(Host, Node, Publisher, PublishModel, MaxItems, ItemId, Payload) ->
|
||||
OldItem#pubsub_item{modification = PubId,
|
||||
payload = Payload}
|
||||
end,
|
||||
Items = [ItemId | State#pubsub_state.items],
|
||||
Items = [ItemId | State#pubsub_state.items--[ItemId]],
|
||||
{result, {NI, OI}} = remove_extra_items(
|
||||
Host, Node, MaxItems, Items),
|
||||
set_item(Item),
|
||||
if MaxItems > 0 -> set_item(Item);
|
||||
true -> ok
|
||||
end,
|
||||
set_state(State#pubsub_state{items = NI}),
|
||||
{result, {default, broadcast, OI}}
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user