Skip to content

Commit

Permalink
Merge tag 'v1.9.1' into calref
Browse files Browse the repository at this point in the history
1.9.1
=====

This is a bugfix release, fixing mostly regressions from 1.9.0.

Changes
-------

- cburschka#204 addendum The jquery-ui icons are now copied to the CDN prefix
       during installation.

- cburschka#256: Navigation links are now displayed again. The cburschka#213 fixes accidentally
        removed the link anchor texts from the navigation links.

- cburschka#257: The dash theme now correctly styles buttons in dialog overlays,
        which lack the .button class and must be selected with .dialog button.

- cburschka#258: Backslash escape sequences are now correctly stripped in parseArgs(),
        which only stripped the first sequence in each argument before.

- cburschka#263: /version now shows the client version as just "v0.0.0" instead of
        (inaccurately) "cadence-v0.0.0".

- cburschka#264: Plaintext messages (only generated by clients other than cadence,
        which sends all messages with an XHTML-IM body) are now properly escaped
        rather than being interpreted as HTML code.

- cburschka#265: Room history messages are now attributed to users in the room by their JID.
        This properly styles authors who changed their nickname after sending the
        message, and does not misidentify authors whose former nickname is now
        being used by someone else.

- cburschka#266: A :flutterkay: emote has been added.
  • Loading branch information
cburschka committed Jun 11, 2015
2 parents 3a1f0b8 + 3154f33 commit ad583c4
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 17 deletions.
1 change: 1 addition & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ ifneq (.,${PREFIX})
$(CP) -au index.html "${PREFIX}/"
endif
$(CP) -au "${SRC_PATH}/css/alt" "${CDN_PREFIX}/css/"
$(CP) -au "${SRC_PATH}/css/global/images/" "${CDN_PREFIX}/css/global/"
$(CP) -au "${SRC_PATH}/img" "${SRC_PATH}/sounds" "${CDN_PREFIX}/"
else
install: all ${LIB_FILES}
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=1.9.0-calref
VERSION=1.9.1-calref
2 changes: 1 addition & 1 deletion css/alt/dash.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ h3, .ui-tabs-nav li.ui-tabs-active {
}
h3, li.ui-tabs-active a { color: #c6006f }
.box, #emoticonsContainer, #trayContainer, .ui-tabs-nav li,
input[type=text], input[type=password], textarea.form-field, select, button.button {
input[type=text], input[type=password], textarea.form-field, select, button.button, .dialog button {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.6);
box-shadow: 0 0 4px white;
border: 1px solid #222;
Expand Down
1 change: 1 addition & 0 deletions emoticon-packs/ponicons/emoticons.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
":flutterblush:": "flutterblush.png",
":fluttercry:": "fluttercry.png",
":flutterfear:": "flutterfear.png",
":flutterkay:": "flutterkay.png",
":flutterjerk:": "flutterjerk.png",
":fluttershh:": "fluttershh.png",
":fluttershy:": "fluttershy.png",
Expand Down
Binary file added emoticon-packs/ponicons/flutterkay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions js/core/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,8 @@ var chat = {
*/
version: function() {
var version = visual.format.plain(config.version);
version = '<a href="https://github.com/calref/cadence/tree/' + version + '">'
+ 'cadence-' + version + '</a>';
version = '<a href="https://github.com/calref/cadence/tree/'
+ version + '">' + version + '</a>';
ui.messageAddInfo(strings.info.versionClient, {version: version});
if (xmpp.status == 'online' || xmpp.status == 'prejoin') {
xmpp.getVersion(function(version) {
Expand Down Expand Up @@ -814,7 +814,7 @@ var chat = {
for (var match; match = re.exec(text); ) {
// keyvalue: 1 = key, 2|3|4 = value
if (match[1]) {
var v = (match[2] || match[3] || match[4]).replace(/\\([\\\s"'])/, '$1');
var v = (match[2] || match[3] || match[4]).replace(/\\([\\\s"'])/g, '$1');
if (['0', 'no', 'off', 'false'].indexOf(v) >= 0) v = false;
arguments[match[1]] = v;
arguments[1][match[1]] = re.lastIndex;
Expand All @@ -826,7 +826,7 @@ var chat = {
}
// value: 6|7|8 = value
else {
arguments[0].push((match[6] || match[7] || match[8]).replace(/\\([\\\s"'])/, '$1'));
arguments[0].push((match[6] || match[7] || match[8]).replace(/\\([\\\s"'])/g, '$1'));
arguments[1][0].push(re.lastIndex);
}
}
Expand Down
4 changes: 3 additions & 1 deletion js/core/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ var ui = {

// Build the navigation menu.
for (link in config.ui.navigation)
$('#navigation ul').append($('<li></li>').append($('<a></a>').attr('href', config.ui.navigation[link])));
$('#navigation ul').append($('<li>').append(
$('<a>').attr('href', config.ui.navigation[link]).text(link)
));
if (config.ui.navigation) $('#navigation').css('display', 'inline-block');

// Build and fill the emoticon containers.
Expand Down
40 changes: 30 additions & 10 deletions js/core/xmpp.js
Original file line number Diff line number Diff line change
Expand Up @@ -837,8 +837,9 @@ var xmpp = {
var domain = Strophe.getDomainFromJid(from);
var node = Strophe.unescapeNode(Strophe.getNodeFromJid(from) || '') || null;
var resource = Strophe.getResourceFromJid(from);
var time = $('delay', stanza).attr('stamp');
var body = $('html body p', stanza).html() || $($('body', stanza)[0]).text();
var body = $('html body p', stanza).html() || visual.format.plain($($('body', stanza)[0]).text());
var delay = $('delay', stanza);
var time = delay.attr('stamp') || (new Date()).toISOString();

// Message of the Day.
if ((domain == config.xmpp.domain || domain == config.xmpp.mucService) && !node && !resource)
Expand All @@ -865,9 +866,11 @@ var xmpp = {
// Only accept MUC messages in the current room.
if (node != this.room.current) return true;

// If the sender is not in the room, just show the nick.
// This *should* only happen for backlog messages.
var user = this.roster[node][resource] || {nick: resource};
// Do not look up the nick for delayed messages, because it's unreliable.
if (!delay.length) {
// Fall back on just the nick if no roster entry exists (usually an error).
var user = this.roster[node][resource] || {nick: resource};
}
}

// Accept direct messages from other domains.
Expand All @@ -878,11 +881,28 @@ var xmpp = {
return true
}
}
this.historyEnd[node] = time || (new Date()).toISOString();

if (time) ui.messageDelayed(
{user: user, body: body, time: time, room: this.room.available[node], type: type}
);
this.historyEnd[node] = time;

if (delay.length) {
user = {nick: resource}
var jid = delay.attr('from');
// In non-anonymous rooms, try to identify the author by JID.
if (Strophe.getBareJidFromJid(jid) != Strophe.getBareJidFromJid(from)) {
for (var nick in this.roster[node]) {
if (this.roster[node][nick].jid == jid) {
user = $.extend({}, this.roster[node][nick], user)
break;
}
}
}
ui.messageDelayed({
user: user,
body: body,
time: delay.attr('stamp'),
room: this.room.available[node],
type: type
});
}
else {
var message = {user: user, body: body, type: type};
ui.messageAppend(visual.formatMessage(message));
Expand Down

0 comments on commit ad583c4

Please sign in to comment.