warn when chat message didn’t make it but the server actually send a response
This commit is contained in:
10
code/chat.js
10
code/chat.js
@ -685,11 +685,15 @@ window.chat.postMsg = function() {
|
||||
lngE6: Math.round(latlng.lng*1E6),
|
||||
factionOnly: !public};
|
||||
|
||||
var errMsg = 'Your message could not be delivered. You can copy&' +
|
||||
'paste it here and try again if you want:\n\n' + msg;
|
||||
|
||||
window.postAjax('sendPlext', data,
|
||||
function() { if(public) chat.requestNewPublic(); else chat.requestNewFaction(); },
|
||||
function(response) {
|
||||
if(response.error) alert(errMsg);
|
||||
if(public) chat.requestNewPublic(); else chat.requestNewFaction(); },
|
||||
function() {
|
||||
alert('Your message could not be delivered. You can copy&' +
|
||||
'paste it here and try again if you want:\n\n'+msg);
|
||||
alert(errMsg);
|
||||
}
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user