[IMP] web: allow mentioning people right after inviting them

Before this commit, the list of channel members is fetched once, and never reloaded.
So, when a new member is invited, he cannot be mentionned by the autocompletion.
With this commit, we remove the 'members_deferred' from the channel,
which will cause the member list to be refetched next time it is needed.
This commit is contained in:
fwi-odoo
2016-12-15 11:15:04 +01:00
parent 168908656d
commit 34b7fd833c
@@ -78,6 +78,9 @@ var PartnerInviteDialog = Dialog.extend({
var names = _.escape(_.pluck(data, 'text').join(', '));
var notification = _.str.sprintf(_t('You added <b>%s</b> to the conversation.'), names);
self.do_notify(_t('New people'), notification);
// Clear the members_deferred to fetch again the partner
// when get_mention_partner_suggestions from the chat_manager is triggered
delete chat_manager.get_channel(self.channel_id).members_deferred;
});
}
},