summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHoussam Haidar <houssam@sdelements.com>2015-04-01 09:49:02 -0400
committerHoussam Haidar <houssam@sdelements.com>2015-04-01 09:49:02 -0400
commita5f0aba1d382a528138834a88d5786659bdcfe30 (patch)
treee20891050c3a1376329c64aa7b62417f38fd650b
parentdf920f3d4908d2ed85c46e458d810f6ea3594df9 (diff)
downloadlets-chat-origin/shhh.zip
lets-chat-origin/shhh.tar.gz
lets-chat-origin/shhh.tar.bz2
Charge the right peopleorigin/shhh
-rw-r--r--media/js/views/client.js3
-rw-r--r--media/js/views/window.js3
2 files changed, 4 insertions, 2 deletions
diff --git a/media/js/views/client.js b/media/js/views/client.js
index c460333..bcd677c 100644
--- a/media/js/views/client.js
+++ b/media/js/views/client.js
@@ -57,7 +57,8 @@
});
this.premium = new window.LCB.PremiumView({
el: this.$('.lcb-premium'),
- rooms: this.client.rooms
+ rooms: this.client.rooms,
+ client: this.client
});
if (this.client.options.filesEnabled) {
this.upload = new window.LCB.UploadView({
diff --git a/media/js/views/window.js b/media/js/views/window.js
index a3e17c8..4e5fe77 100644
--- a/media/js/views/window.js
+++ b/media/js/views/window.js
@@ -220,6 +220,7 @@
'click .no': 'no'
},
initialize: function(options) {
+ this.client = options.client;
this.rooms = options.rooms;
this.rooms.on('messages:new', this.chaChing, this);
this.amount(store.get('aprilfools_balance'));
@@ -229,7 +230,7 @@
this.$('.lcb-premium-amount').text(amount.toFixed(2));
},
chaChing: function(moneyMaker) {
- if (moneyMaker.historical) {
+ if (moneyMaker.historical || this.client.user.id !== moneyMaker.owner.id) {
// Doubble texation is wrong. lol.
return;
}