Skip to content

Instantly share code, notes, and snippets.

@spf2
Last active October 13, 2016 22:04
Show Gist options
  • Save spf2/83621148a4ad950b1dfbe620cf4661b9 to your computer and use it in GitHub Desktop.
Save spf2/83621148a4ad950b1dfbe620cf4661b9 to your computer and use it in GitHub Desktop.
function getMessageActions(bubble) {
return [[
"Like",
function(bubble, peers) { peers.send("like", "1") },
function(bubble, peers) { peers.send("like", "-1") },
]]
}
var actionHandlers = {
'like': function(bubble, value) {
bubble.badge.count += parseInt(value);
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment