Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
.www.
wechaty
提交
5b903d27
W
wechaty
项目概览
.www.
/
wechaty
与 Fork 源项目一致
Fork自
wechaty / wechaty
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
W
wechaty
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5b903d27
编写于
6月 15, 2016
作者:
Huan (李卓桓)
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of github.com:zixia/wechaty
上级
64c9fa8f
9829fa89
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
36 addition
and
6 deletion
+36
-6
README.md
README.md
+2
-1
doc/webwxapp.js
doc/webwxapp.js
+27
-3
example/image-bot.js
example/image-bot.js
+6
-1
package.json
package.json
+1
-1
未找到文件。
README.md
浏览文件 @
5b903d27
...
...
@@ -378,8 +378,9 @@ Know more about TAP: [Why I use Tape Instead of Mocha & So Should You](https://m
# Version History
## v0.1.
3
(master)
## v0.1.
6
(master)
1.
add a watchdog to restore from unknown state
2.
add support to download image message by
`ImageMessage.readyStream()`
## v0.1.1 (2016/6/10)
1.
add support to save & restore wechat login session
...
...
doc/webwxapp.js
浏览文件 @
5b903d27
...
...
@@ -2833,7 +2833,18 @@ angular.module("Services", []),
}(),
!
function
()
{
"
use strict
"
;
angular
.
module
(
"
Services
"
).
factory
(
"
chatroomFactory
"
,
[
"
$rootScope
"
,
"
$timeout
"
,
"
$http
"
,
"
$q
"
,
"
contactFactory
"
,
"
accountFactory
"
,
"
emojiFactory
"
,
"
confFactory
"
,
"
utilFactory
"
,
"
reportService
"
,
"
mmHttp
"
,
function
(
e
,
t
,
o
,
n
,
r
,
a
,
i
,
c
,
s
,
l
)
{
angular
.
module
(
"
Services
"
).
factory
(
"
chatroomFactory
"
,
[
"
$rootScope
"
,
"
$timeout
"
,
"
$http
"
,
"
$q
"
,
"
contactFactory
"
,
"
accountFactory
"
,
"
emojiFactory
"
,
"
confFactory
"
,
"
utilFactory
"
,
"
reportService
"
,
"
mmHttp
"
,
function
(
e
,
t
,
o
,
n
,
r
,
a
,
i
,
c
,
s
,
l
)
{
var
u
,
f
=
{},
d
=
{
setCurrentContact
:
function
(
e
)
{
u
=
e
...
...
@@ -8409,7 +8420,14 @@ function() {
}
}
}
]).
config
([
"
$sceProvider
"
,
"
$httpProvider
"
,
"
$logProvider
"
,
"
$stateProvider
"
,
"
$urlRouterProvider
"
,
"
ngClipProvider
"
,
function
(
e
,
t
,
o
,
n
,
r
,
a
)
{
]).
config
([
"
$sceProvider
"
,
"
$httpProvider
"
,
"
$logProvider
"
,
"
$stateProvider
"
,
"
$urlRouterProvider
"
,
"
ngClipProvider
"
,
function
(
e
// $sceProvider
,
t
// $httpProvider
,
o
// $logProvider
,
n
// $stateProvider
,
r
// $urlRouterProvider
,
a
// $ngClipProvider
)
{
e
.
enabled
(
!
1
),
o
.
debugEnabled
(
!
0
),
a
.
setPath
(
window
.
MMSource
.
copySwfPath
),
...
...
@@ -8424,7 +8442,13 @@ function() {
},
views
:
{
navView
:
{
controller
:
[
"
$stateParams
"
,
"
chatFactory
"
,
"
contactFactory
"
,
"
stateManageService
"
,
"
$rootScope
"
,
function
(
e
,
t
,
o
,
n
,
r
)
{
controller
:
[
"
$stateParams
"
,
"
chatFactory
"
,
"
contactFactory
"
,
"
stateManageService
"
,
"
$rootScope
"
,
function
(
e
// $stateParams
,
t
// chatFactory
,
o
// contactFactory
,
n
// stateManageService
,
r
// $rootScope
)
{
function
a
()
{
var
n
=
o
.
getContact
(
e
.
userName
,
""
,
!
0
);
r
.
$broadcast
(
"
root:statechange
"
),
...
...
example/image-bot.js
浏览文件 @
5b903d27
...
...
@@ -7,15 +7,20 @@ bot
})
.
on
(
'
message
'
,
m
=>
{
console
.
log
(
`RECV:
${
m
}
`
)
if
(
m
.
type
()
===
Wechaty
.
Message
.
Type
.
IMAGE
)
{
console
.
log
(
'
IMAGE url:
'
+
m
.
get
(
'
url
'
))
const
filename
=
m
.
id
+
'
.jpg
'
console
.
log
(
'
IMAGE local filename:
'
+
filename
)
var
fileStream
=
require
(
'
fs
'
).
createWriteStream
(
filename
)
m
.
readyStream
()
.
then
(
stream
=>
stream
.
pipe
(
fileStream
))
.
catch
(
e
=>
log
.
error
(
'
stream error
'
,
e
))
.
catch
(
e
=>
console
.
log
(
'
stream error:
'
+
e
))
}
})
.
init
()
.
catch
(
e
=>
console
.
error
(
'
bot.init() error:
'
+
e
))
package.json
浏览文件 @
5b903d27
{
"name"
:
"wechaty"
,
"version"
:
"0.1.
5
"
,
"version"
:
"0.1.
6
"
,
"description"
:
"Wechat for Bot. (Personal Account, NOT Official Account)"
,
"main"
:
"index.js"
,
"scripts"
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录