Skip to content

Commit

Permalink
Patch ehForwarderBot#33: Fix failing to reply to specific message
Browse files Browse the repository at this point in the history
  • Loading branch information
milkice233 committed Jan 26, 2020
1 parent 18dfbb2 commit 11e08b8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions efb_qq_slave/Clients/CoolQ/CoolQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,18 +512,17 @@ def send_message(self, msg: 'Message') -> 'Message':
if msg.type in [MsgType.Text, MsgType.Link]:
if msg.text == "kick`":
group_id = chat_type[1]
user_id = msg.target.author.uid.split('_')[1]
user_id = msg.target.author.uid
self.coolq_api_query("set_group_kick",
group_id=group_id,
user_id=user_id)
else:
if isinstance(msg.target, Message):
max_length = 50
tgt_text = coolq_text_encode(process_quote_text(msg.target.text, max_length))
user_type = msg.target.author.uid.split('_')
tgt_alias = ""
if chat_type[0] != 'private' and not isinstance(msg.target.author, SelfChatMember):
tgt_alias += m.coolq_code_at_wrapper(user_type[1])
tgt_alias += m.coolq_code_at_wrapper(msg.target.author.uid)
else:
tgt_alias = ""
msg.text = "%s%s\n\n%s" % (tgt_alias, tgt_text, coolq_text_encode(msg.text))
Expand Down

0 comments on commit 11e08b8

Please sign in to comment.