mirror of https://github.com/zulip/zulip.git
Parse message IDs as floats
(imported from commit d9954e4225e95e2931be1d1fe5ecf0b93914b07e)
This commit is contained in:
parent
f0e3afe0d3
commit
80e6dab78a
|
@ -86,7 +86,7 @@ MessageList.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
get: function MessageList_get(id) {
|
get: function MessageList_get(id) {
|
||||||
id = parseInt(id, 10);
|
id = parseFloat(id);
|
||||||
if (isNaN(id)) {
|
if (isNaN(id)) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ MessageList.prototype = {
|
||||||
previously_selected: this._selected_id
|
previously_selected: this._selected_id
|
||||||
});
|
});
|
||||||
|
|
||||||
id = parseInt(id, 10);
|
id = parseFloat(id);
|
||||||
if (isNaN(id)) {
|
if (isNaN(id)) {
|
||||||
blueslip.fatal("Bad message id");
|
blueslip.fatal("Bad message id");
|
||||||
}
|
}
|
||||||
|
@ -262,7 +262,7 @@ MessageList.prototype = {
|
||||||
_add_to_hash: function MessageList__add_to_hash(messages) {
|
_add_to_hash: function MessageList__add_to_hash(messages) {
|
||||||
var self = this;
|
var self = this;
|
||||||
messages.forEach(function (elem) {
|
messages.forEach(function (elem) {
|
||||||
var id = parseInt(elem.id, 10);
|
var id = parseFloat(elem.id);
|
||||||
if (isNaN(id)) {
|
if (isNaN(id)) {
|
||||||
blueslip.fatal("Bad message id");
|
blueslip.fatal("Bad message id");
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ exports.last_visible = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.id = function (message_row) {
|
exports.id = function (message_row) {
|
||||||
return parseInt(message_row.attr('zid'), 10);
|
return parseFloat(message_row.attr('zid'), 10);
|
||||||
};
|
};
|
||||||
|
|
||||||
var valid_table_names = {
|
var valid_table_names = {
|
||||||
|
|
Loading…
Reference in New Issue