Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
.Veneno.
wechaty
提交
40cb8b06
W
wechaty
项目概览
.Veneno.
/
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,发现更多精彩内容 >>
提交
40cb8b06
编写于
6月 11, 2018
作者:
Huan (李卓桓)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clean log
上级
53934e4e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
8 deletion
+8
-8
src/puppet-padchat/pure-function-helper.ts
src/puppet-padchat/pure-function-helper.ts
+1
-1
src/puppet/puppet.ts
src/puppet/puppet.ts
+7
-7
未找到文件。
src/puppet-padchat/pure-function-helper.ts
浏览文件 @
40cb8b06
...
...
@@ -391,7 +391,7 @@ export class PadchatPureFunctionHelper {
let
decodedText
:
string
// it seems the different server API version (bond with different wechat accounts)
//
will return URIEncoded /
Plain JSON Text.
//
is not consistent of the protocol: some time return URIEncoded, and some time return
Plain JSON Text.
try
{
// Server return data need decodeURIComponent
decodedText
=
encodedText
.
replace
(
/
\+
/g
,
'
%20
'
)
...
...
src/puppet/puppet.ts
浏览文件 @
40cb8b06
...
...
@@ -505,14 +505,14 @@ export abstract class Puppet extends EventEmitter implements Sayable {
public
abstract
async
friendRequestRawPayloadParser
(
rawPayload
:
any
)
:
Promise
<
FriendRequestPayload
>
public
friendRequestPayloadCache
(
friendRequestId
:
string
):
undefined
|
FriendRequestPayload
{
log
.
silly
(
'
Puppet
'
,
'
friendRequestPayloadCache(id=%s) @ %s
'
,
friendRequestId
,
this
)
//
log.silly('Puppet', 'friendRequestPayloadCache(id=%s) @ %s', friendRequestId, this)
if
(
!
friendRequestId
)
{
throw
new
Error
(
'
no id
'
)
}
const
cachedPayload
=
this
.
cacheFriendRequestPayload
.
get
(
friendRequestId
)
if
(
cachedPayload
)
{
log
.
silly
(
'
Puppet
'
,
'
friendRequestPayload(%s) cache HIT
'
,
friendRequestId
)
//
log.silly('Puppet', 'friendRequestPayload(%s) cache HIT', friendRequestId)
}
else
{
log
.
silly
(
'
Puppet
'
,
'
friendRequestPayload(%s) cache MISS
'
,
friendRequestId
)
}
...
...
@@ -570,13 +570,13 @@ export abstract class Puppet extends EventEmitter implements Sayable {
public
abstract
async
messageRawPayloadParser
(
rawPayload
:
any
)
:
Promise
<
MessagePayload
>
public
messagePayloadCache
(
messageId
:
string
):
undefined
|
MessagePayload
{
log
.
silly
(
'
Puppet
'
,
'
messagePayloadCache(id=%s) @ %s
'
,
messageId
,
this
)
//
log.silly('Puppet', 'messagePayloadCache(id=%s) @ %s', messageId, this)
if
(
!
messageId
)
{
throw
new
Error
(
'
no id
'
)
}
const
cachedPayload
=
this
.
cacheMessagePayload
.
get
(
messageId
)
if
(
cachedPayload
)
{
log
.
silly
(
'
Puppet
'
,
'
messagePayloadCache(%s) cache HIT
'
,
messageId
)
//
log.silly('Puppet', 'messagePayloadCache(%s) cache HIT', messageId)
}
else
{
log
.
silly
(
'
Puppet
'
,
'
messagePayloadCache(%s) cache MISS
'
,
messageId
)
}
...
...
@@ -775,13 +775,13 @@ export abstract class Puppet extends EventEmitter implements Sayable {
}
public
roomPayloadCache
(
roomId
:
string
):
undefined
|
RoomPayload
{
log
.
silly
(
'
Puppet
'
,
'
roomPayloadCache(id=%s) @ %s
'
,
roomId
,
this
)
//
log.silly('Puppet', 'roomPayloadCache(id=%s) @ %s', roomId, this)
if
(
!
roomId
)
{
throw
new
Error
(
'
no id
'
)
}
const
cachedPayload
=
this
.
cacheRoomPayload
.
get
(
roomId
)
if
(
cachedPayload
)
{
log
.
silly
(
'
Puppet
'
,
'
roomPayloadCache(%s) cache HIT
'
,
roomId
)
//
log.silly('Puppet', 'roomPayloadCache(%s) cache HIT', roomId)
}
else
{
log
.
silly
(
'
Puppet
'
,
'
roomPayloadCache(%s) cache MISS
'
,
roomId
)
}
...
...
@@ -843,7 +843,7 @@ export abstract class Puppet extends EventEmitter implements Sayable {
const
cachedPayload
=
this
.
cacheRoomMemberPayload
.
get
(
cacheKey
)
if
(
cachedPayload
)
{
log
.
silly
(
'
Puppet
'
,
'
roomMemberPayloadCache(%s) cache HIT
'
,
roomId
)
//
log.silly('Puppet', 'roomMemberPayloadCache(%s) cache HIT', roomId)
}
else
{
log
.
silly
(
'
Puppet
'
,
'
roomMemberPayloadCache(%s) cache MISS
'
,
roomId
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录