Merge branch 'master' into plugins-refactor
This commit is contained in:
commit
3ea3ac52a3
@ -1,11 +1,11 @@
|
|||||||
# You can set these variables from the command line.
|
# You can set these variables from the command line.
|
||||||
GRUNT ?= node_modules\.bin\grunt.cmd
|
GRUNT ?= node_modules\.bin\grunt.cmd
|
||||||
BOWER ?= node_modules\.bin\bower
|
BOWER ?= node_modules\.bin\bower.cmd
|
||||||
PHANTOMJS ?= node_modules\.bin\phantomjs
|
PHANTOMJS ?= node_modules\.bin\phantomjs.cmd
|
||||||
SASS ?= sass
|
SASS ?= sass
|
||||||
RMRF ?= rmdir /q /s
|
RMRF ?= rmdir /q /s
|
||||||
RMF ?= del /q
|
RMF ?= del /q
|
||||||
HTTPSERVE ?= ./node_modules/.bin/http-server
|
HTTPSERVE ?= ./node_modules/.bin/http-server.cmd
|
||||||
|
|
||||||
.PHONY: all help clean css minjs build
|
.PHONY: all help clean css minjs build
|
||||||
|
|
||||||
|
22
converse.js
22
converse.js
@ -924,7 +924,7 @@
|
|||||||
$message.find(INACTIVE).length && INACTIVE ||
|
$message.find(INACTIVE).length && INACTIVE ||
|
||||||
$message.find(ACTIVE).length && ACTIVE ||
|
$message.find(ACTIVE).length && ACTIVE ||
|
||||||
$message.find(GONE).length && GONE,
|
$message.find(GONE).length && GONE,
|
||||||
stamp, time, sender, from, createMessage;
|
stamp, time, sender, from;
|
||||||
|
|
||||||
if (is_groupchat) {
|
if (is_groupchat) {
|
||||||
from = Strophe.unescapeNode(Strophe.getResourceFromJid($message.attr('from')));
|
from = Strophe.unescapeNode(Strophe.getResourceFromJid($message.attr('from')));
|
||||||
@ -943,11 +943,6 @@
|
|||||||
} else {
|
} else {
|
||||||
sender = 'them';
|
sender = 'them';
|
||||||
}
|
}
|
||||||
if (!body) {
|
|
||||||
createMessage = this.messages.add;
|
|
||||||
} else {
|
|
||||||
createMessage = this.messages.create;
|
|
||||||
}
|
|
||||||
this.messages.create({
|
this.messages.create({
|
||||||
chat_state: chat_state,
|
chat_state: chat_state,
|
||||||
delayed: delayed,
|
delayed: delayed,
|
||||||
@ -3488,11 +3483,11 @@
|
|||||||
initialize: function (attributes, options) {
|
initialize: function (attributes, options) {
|
||||||
var jid = attributes.jid;
|
var jid = attributes.jid;
|
||||||
this.set(_.extend({
|
this.set(_.extend({
|
||||||
'id': jid,
|
'id': Strophe.getBareJidFromJid(jid),
|
||||||
'fullname': jid,
|
'fullname': jid,
|
||||||
'chat_status': 'offline',
|
'chat_status': 'offline',
|
||||||
'user_id': Strophe.getNodeFromJid(jid),
|
'user_id': Strophe.getNodeFromJid(jid),
|
||||||
'resources': [],
|
'resources': [Strophe.getResourceFromJid(jid)],
|
||||||
'groups': [],
|
'groups': [],
|
||||||
'image_type': 'image/png',
|
'image_type': 'image/png',
|
||||||
'image': "iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAIAAABt+uBvAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gwHCy455JBsggAABkJJREFUeNrtnM1PE1sUwHvvTD8otWLHST/Gimi1CEgr6M6FEWuIBo2pujDVsNDEP8GN/4MbN7oxrlipG2OCgZgYlxAbkRYw1KqkIDRCSkM7nXvvW8x7vjyNeQ9m7p1p3z1LQk/v/Dhz7vkEXL161cHl9wI5Ag6IA+KAOCAOiAPigDggLhwQB2S+iNZ+PcYY/SWEEP2HAAAIoSAIoihCCP+ngDDGtVotGAz29/cfOXJEUZSOjg6n06lp2sbGRqlUWlhYyGazS0tLbrdbEASrzgksyeYJId3d3el0uqenRxRFAAAA4KdfIIRgjD9+/Pj8+fOpqSndslofEIQwHA6Pjo4mEon//qmFhYXHjx8vLi4ihBgDEnp7e9l8E0Jo165dQ0NDd+/eDYVC2/qsJElDQ0OEkKWlpa2tLZamxAhQo9EIBoOjo6MXL17csZLe3l5FUT59+lQul5l5JRaAVFWNRqN37tw5ceKEQVWRSOTw4cOFQuHbt2+iKLYCIISQLMu3b99OJpOmKAwEAgcPHszn8+vr6wzsiG6UQQhxuVyXLl0aGBgwU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XPeyeagAAAoHArVu3BgcHab8CuVzu4cOHpVKJUnfA5GweY+xyuc6cOXPv3r1IJMLAR8iyPDw8XK/Xi8Wiqqqmm5KZgBBC7e3tN27cuHbtGuPVpf7+/lAoNDs7W61WzfVKpgHSSzw3b95MpVKW3MfRaDQSiczNzVUqFRMZmQOIEOL1eq9fv3727FlL1t50URRFluX5+flqtWpWEGAOIFEUU6nUlStXLKSjy759+xwOx9zcnKZpphzGHMzhcDiTydgk9r1w4YIp7RPTAAmCkMlk2FeLf/tIEKbTab/fbwtAhJBoNGrutpNx6e7uPnTokC1eMU3T0um0DZPMkZER6wERQnw+n/FFSxpy7Nix3bt3WwwIIcRgIWnHkkwmjecfRgGx7DtuV/r6+iwGhDHev3+/bQF1dnYaH6E2CkiWZdsC2rt3r8WAHA5HW1ubbQGZcjajgOwTH/4qNko1Wlg4IA6IA+KAOKBWBUQIsfNojyliKIoRRfH9+/dut9umf3wzpoUNNQ4BAJubmwz+ic+OxefzWWlBhJD29nbug7iT5sIBcUAcEAfEAXFAHBAHxOVn+QMrmWpuPZx12gAAAABJRU5ErkJggg==",
|
||||||
@ -5689,16 +5684,17 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
var getWrappedChatBox = function (jid) {
|
var getWrappedChatBox = function (jid) {
|
||||||
var chatbox = converse.chatboxes.get(jid);
|
var bare_jid = Strophe.getBareJidFromJid(jid);
|
||||||
|
var chatbox = converse.chatboxes.get(bare_jid);
|
||||||
if (!chatbox) {
|
if (!chatbox) {
|
||||||
var roster_item = converse.roster.get(jid);
|
var roster_item = converse.roster.get(bare_jid);
|
||||||
if (roster_item === undefined) {
|
if (roster_item === undefined) {
|
||||||
converse.log('Could not get roster item for JID '+jid, 'error');
|
converse.log('Could not get roster item for JID '+bare_jid, 'error');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
chatbox = converse.chatboxes.create({
|
chatbox = converse.chatboxes.create({
|
||||||
'id': jid,
|
'id': bare_jid,
|
||||||
'jid': jid,
|
'jid': bare_jid,
|
||||||
'fullname': _.isEmpty(roster_item.get('fullname'))? jid: roster_item.get('fullname'),
|
'fullname': _.isEmpty(roster_item.get('fullname'))? jid: roster_item.get('fullname'),
|
||||||
'image_type': roster_item.get('image_type'),
|
'image_type': roster_item.get('image_type'),
|
||||||
'image': roster_item.get('image'),
|
'image': roster_item.get('image'),
|
||||||
|
Loading…
Reference in New Issue
Block a user