Add name when replying
This commit is contained in:
parent
fa9c44b45c
commit
d926f974b7
|
@ -86,14 +86,14 @@ class Jabbergram(sleekxmpp.ClientXMPP):
|
||||||
|
|
||||||
def read_tg(self):
|
def read_tg(self):
|
||||||
update_id = 0
|
update_id = 0
|
||||||
name = ''
|
|
||||||
|
|
||||||
# wait until http_upload has been tested
|
# wait until http_upload has been tested
|
||||||
sleep(5)
|
sleep(5)
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
for update in self.bot.getUpdates(offset=update_id,
|
for update in self.bot.getUpdates(offset=update_id,
|
||||||
timeout=10):
|
timeout=10):
|
||||||
|
name = ''
|
||||||
|
|
||||||
if not self.group_name:
|
if not self.group_name:
|
||||||
self.group_name = update.message.chat.username
|
self.group_name = update.message.chat.username
|
||||||
if update.message.audio or update.message.document or \
|
if update.message.audio or update.message.document or \
|
||||||
|
@ -161,7 +161,8 @@ class Jabbergram(sleekxmpp.ClientXMPP):
|
||||||
update.message.reply_to_message.text
|
update.message.reply_to_message.text
|
||||||
else:
|
else:
|
||||||
message = update.message.reply_to_message.text
|
message = update.message.reply_to_message.text
|
||||||
message = message + ' <- ' + update.message.text
|
message = message + ' <- ' + name + ':' + update.\
|
||||||
|
message.text
|
||||||
else:
|
else:
|
||||||
message = update.message.text
|
message = update.message.text
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue