|
|
@ -1291,11 +1291,12 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getReplyKeyboard (peerID) { |
|
|
|
function getReplyKeyboard (peerID) { |
|
|
|
|
|
|
|
console.log('get', historiesStorage[peerID]); |
|
|
|
return (historiesStorage[peerID] || {}).reply_markup || false; |
|
|
|
return (historiesStorage[peerID] || {}).reply_markup || false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function mergeReplyKeyboard (historyStorage, message) { |
|
|
|
function mergeReplyKeyboard (historyStorage, message) { |
|
|
|
console.log('merge', message.reply_markup, historyStorage.reply_markup); |
|
|
|
console.log('merge', message.id, message.reply_markup, historyStorage.reply_markup); |
|
|
|
if (!message.reply_markup && |
|
|
|
if (!message.reply_markup && |
|
|
|
!( |
|
|
|
!( |
|
|
|
historyStorage.reply_markup !== undefined && |
|
|
|
historyStorage.reply_markup !== undefined && |
|
|
@ -1321,16 +1322,18 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) |
|
|
|
messageReplyMarkup.fromID = message.from_id; |
|
|
|
messageReplyMarkup.fromID = message.from_id; |
|
|
|
} |
|
|
|
} |
|
|
|
historyStorage.reply_markup = messageReplyMarkup; |
|
|
|
historyStorage.reply_markup = messageReplyMarkup; |
|
|
|
|
|
|
|
console.log('set', historyStorage.reply_markup); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (lastReplyMarkup && |
|
|
|
if (lastReplyMarkup && |
|
|
|
lastReplyMarkup.pFlags.one_time && |
|
|
|
lastReplyMarkup.pFlags.one_time && |
|
|
|
!lastReplyMarkup.hidden && |
|
|
|
!lastReplyMarkup.pFlags.hidden && |
|
|
|
message.out && |
|
|
|
message.out && |
|
|
|
(message.id > lastReplyMarkup.id || message.id < 0) && |
|
|
|
(message.id > lastReplyMarkup.id || message.id < 0) && |
|
|
|
message.message) { |
|
|
|
message.message) { |
|
|
|
lastReplyMarkup.hidden = true; |
|
|
|
lastReplyMarkup.pFlags.hidden = true; |
|
|
|
|
|
|
|
console.log('set', historyStorage.reply_markup); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1343,6 +1346,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) |
|
|
|
id: message.id, |
|
|
|
id: message.id, |
|
|
|
flags: 0 |
|
|
|
flags: 0 |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
console.log('set', historyStorage.reply_markup); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2418,6 +2422,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) |
|
|
|
markupButton.rText = RichTextProcessor.wrapRichText(markupButton.text, {noLinks: true, noLinebreaks: true}); |
|
|
|
markupButton.rText = RichTextProcessor.wrapRichText(markupButton.text, {noLinks: true, noLinebreaks: true}); |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
return replyMarkup; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function fetchSingleMessages () { |
|
|
|
function fetchSingleMessages () { |
|
|
|