Add name when replying

This commit is contained in:
drymer 2017-01-29 02:47:46 +00:00
parent fa9c44b45c
commit d926f974b7
1 changed files with 4 additions and 3 deletions

View File

@ -86,14 +86,14 @@ class Jabbergram(sleekxmpp.ClientXMPP):
def read_tg(self):
update_id = 0
name = ''
# wait until http_upload has been tested
sleep(5)
while True:
try:
for update in self.bot.getUpdates(offset=update_id,
timeout=10):
name = ''
if not self.group_name:
self.group_name = update.message.chat.username
if update.message.audio or update.message.document or \
@ -161,7 +161,8 @@ class Jabbergram(sleekxmpp.ClientXMPP):
update.message.reply_to_message.text
else:
message = update.message.reply_to_message.text
message = message + ' <- ' + update.message.text
message = message + ' <- ' + name + ':' + update.\
message.text
else:
message = update.message.text