Browse Source

Fix invalid call to q() when not sending a message

tags/0.8.0
Adrian Perez de Castro 3 years ago
parent
commit
e69896dc4b
No known key found for this signature in database GPG Key ID: 91C559DBE4C9123B
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      scripts/unbridge.js

+ 3
- 2
scripts/unbridge.js View File

@@ -126,11 +126,12 @@ function setInviteJoinRules(url, roomId, token) {
}

function sendMessage(url, roomId, token, msg) {
var d = promiseutil.defer();
if (!msg) {
console.log("No message provided. Skipping.");
return q();
d.resolve();
return d.promise
}
var d = promiseutil.defer();
var encRoomId = encodeURIComponent(roomId);
request({
url: joinUrl(


Loading…
Cancel
Save