Skip to content

Commit

Permalink
fix: wechat mp channel listen host change #14
Browse files Browse the repository at this point in the history
  • Loading branch information
zhayujie committed Feb 20, 2023
1 parent 5273815 commit fbac22d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,12 @@ Hit Ctrl-C to quit.
```
### 5. Gmail
**需要:** 一个服务器、一个Gmail account
Follow [官方文档](https://support.google.com/mail/answer/185833?hl=en) to create APP password for google account, config as below, then cheers!!!
Follow [官方文档](https://support.google.com/mail/answer/185833?hl=en) to create APP password for google account, config as below, then cheers!!! (contributed by [Simon](https://github.com/413675377)
)
```json
"channel": {
"type": "gmail",
Expand Down
2 changes: 1 addition & 1 deletion channel/terminal/terminal_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def startup(self):
# close log
log.close_log()
context = {"from_user_id": "User", "stream": True}
print("Please input your question\n")
print("\nPlease input your question")
while True:
try:
prompt = self.get_input("User:\n")
Expand Down
1 change: 1 addition & 0 deletions channel/wechat/wechat_mp_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class WechatSubsribeAccount(Channel):
def startup(self):
logger.info('[WX_Public] Wechat Public account service start!')
robot.config['PORT'] = channel_conf(const.WECHAT_MP).get('port')
robot.config['HOST'] = '0.0.0.0'
robot.run()

def handle(self, msg, count=0):
Expand Down
1 change: 1 addition & 0 deletions channel/wechat/wechat_mp_service_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def startup(self):
robot.config['PORT'] = channel_conf(const.WECHAT_MP).get('port')
robot.config["APP_ID"] = channel_conf(const.WECHAT_MP).get('app_id')
robot.config["APP_SECRET"] = channel_conf(const.WECHAT_MP).get('app_secret')
robot.config['HOST'] = '0.0.0.0'
robot.run()

def handle(self, msg, count=0):
Expand Down
3 changes: 3 additions & 0 deletions config-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"group_name_white_list": ["ChatGPT测试群"],
"image_create_prefix": ["", "", "找一张"],

"terminal": {
},

"wechat": {
},

Expand Down

0 comments on commit fbac22d

Please sign in to comment.