mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
VKAPI: Allow sending messages not only to friends
Modification taken from e5c650e351
I hope it works properly
This commit is contained in:
parent
5bced47724
commit
75030bfdc4
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ final class Messages extends VKAPIRequestHandler
|
||||||
if(!$peer)
|
if(!$peer)
|
||||||
$this->fail(936, "There is no peer with this id");
|
$this->fail(936, "There is no peer with this id");
|
||||||
|
|
||||||
if($this->getUser()->getId() !== $peer->getId() && $peer->getSubscriptionStatus($this->getUser()) !== 3)
|
if($this->getUser()->getId() !== $peer->getId() && !$peer->getPrivacyPermission('messages.write', $this->getUser()))
|
||||||
$this->fail(945, "This chat is disabled because of privacy settings");
|
$this->fail(945, "This chat is disabled because of privacy settings");
|
||||||
|
|
||||||
# Finally we get to send a message!
|
# Finally we get to send a message!
|
||||||
|
|
Loading…
Reference in a new issue