mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
does not write item when max_items set to 0 (solves EJAB-768)
SVN Revision: 1661
This commit is contained in:
parent
0083e56c22
commit
f6e2a58772
@ -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-14 Christophe Romain <christophe.romain@process-one.net>
|
||||
|
||||
* src/mod_pubsub/mod_pubsub.erl: fix pubsub_publish_item hook
|
||||
|
@ -455,10 +455,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