Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
hfpp2012
/
vbot
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4cdfbefc
authored
Feb 08, 2017
by
HanSon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
支持PHP5
message文件储存仅debug下写入
1 parent
45dd2d91
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
composer.json
src/Collections/ContactFactory.php
src/Core/MessageHandler.php
composer.json
View file @
4cdfbef
...
...
@@ -16,7 +16,6 @@
"pimple/pimple"
:
"^3.0"
,
"illuminate/support"
:
"^5.3"
,
"nesbot/carbon"
:
"^1.21"
,
"php"
:
">=7.0.0"
,
"aferrandini/phpqrcode"
:
"^1.0"
,
"symfony/console"
:
"3.*"
},
...
...
src/Collections/ContactFactory.php
View file @
4cdfbef
...
...
@@ -66,7 +66,7 @@ class ContactFactory
}
}
myself
()
->
alias
=
contact
()
->
get
(
myself
()
->
username
)[
'Alias'
]
??
myself
()
->
nickname
?
:
myself
()
->
username
;
myself
()
->
alias
=
isset
(
contact
()
->
get
(
myself
()
->
username
)[
'Alias'
])
?
contact
()
->
get
(
myself
()
->
username
)[
'Alias'
]
:
myself
()
->
nickname
?
:
myself
()
->
username
;
}
/**
...
...
src/Core/MessageHandler.php
View file @
4cdfbef
...
...
@@ -194,9 +194,11 @@ class MessageHandler
{
message
()
->
put
(
$message
->
msg
[
'MsgId'
],
$message
);
$file
=
fopen
(
System
::
getPath
()
.
'message.json'
,
'a'
);
if
(
server
()
->
config
[
'debug'
])
{
$file
=
fopen
(
System
::
getPath
()
.
'message.json'
,
'a'
);
fwrite
(
$file
,
json_encode
(
$message
)
.
PHP_EOL
);
fclose
(
$file
);
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment