This commit is contained in:
2021-01-18 21:42:26 +08:00
parent 78e2205d54
commit b71f39df70
2 changed files with 3 additions and 3 deletions

View File

@@ -1060,7 +1060,7 @@ class callbackQueryHandle(Thread):
di['text'] = getTextContentForRSSInList(rssList[ind])
di['parse_mode'] = 'HTML'
di['reply_markup'] = getInlineKeyBoardForRSSInList(
chatId, rssList[ind], ind, self._main._setting._botOwnerList)
chatId, rssList[ind], ind, self._main._setting._botOwnerList.isOwner(self._fromUserId))
self._main._request("editMessageText", "post", json=di)
self.answer()
return

View File

@@ -115,14 +115,14 @@ def getInlineKeyBoardForRSSList(chatId: int, RSSEntries: List[RSSEntry], page: i
return {'inline_keyboard': d}
def getInlineKeyBoardForRSSInList(chatId: int, rssEntry: RSSEntry, index: int, botOwnerList: BotOwnerList = None) -> dict:
def getInlineKeyBoardForRSSInList(chatId: int, rssEntry: RSSEntry, index: int, isOwner: bool = False) -> dict:
d = []
i = -1
d.append([])
i = i + 1
d[i].append(
{'text': '取消订阅', 'callback_data': f'1,{chatId},{InlineKeyBoardForRSSList.Unsubscribe.value},{index}'})
if botOwnerList is not None and botOwnerList.isOwner(chatId):
if isOwner:
d.append([])
i = i + 1
d[i].append(