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 1b5b5ef9
authored
Feb 08, 2017
by
HanSon
Committed by
GitHub
Feb 08, 2017
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge pull request #37 from HanSon/dev
支持PHP5
2 parents
45dd2d91
4cdfbefc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
composer.json
src/Collections/ContactFactory.php
src/Core/MessageHandler.php
composer.json
View file @
1b5b5ef
...
...
@@ -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 @
1b5b5ef
...
...
@@ -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 @
1b5b5ef
...
...
@@ -194,9 +194,11 @@ class MessageHandler
{
message
()
->
put
(
$message
->
msg
[
'MsgId'
],
$message
);
$file
=
fopen
(
System
::
getPath
()
.
'message.json'
,
'a'
);
fwrite
(
$file
,
json_encode
(
$message
)
.
PHP_EOL
);
fclose
(
$file
);
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