forked from GNUsocial/gnu-social
send_message -> sendMessage
This commit is contained in:
parent
326258bfef
commit
6a848bcc8a
@ -47,7 +47,7 @@ class IMChannel extends Channel
|
|||||||
function output($user, $text)
|
function output($user, $text)
|
||||||
{
|
{
|
||||||
$text = '['.common_config('site', 'name') . '] ' . $text;
|
$text = '['.common_config('site', 'name') . '] ' . $text;
|
||||||
$this->imPlugin->send_message($this->imPlugin->get_screenname($user), $text);
|
$this->imPlugin->sendMessage($this->imPlugin->get_screenname($user), $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
function error($user, $text)
|
function error($user, $text)
|
||||||
@ -56,7 +56,7 @@ class IMChannel extends Channel
|
|||||||
|
|
||||||
$screenname = $this->imPlugin->get_screenname($user);
|
$screenname = $this->imPlugin->get_screenname($user);
|
||||||
if($screenname){
|
if($screenname){
|
||||||
$this->imPlugin->send_message($screenname, $text);
|
$this->imPlugin->sendMessage($screenname, $text);
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
common_log(LOG_ERR,
|
common_log(LOG_ERR,
|
||||||
|
@ -88,7 +88,7 @@ abstract class ImPlugin extends Plugin
|
|||||||
*/
|
*/
|
||||||
function send_notice($screenname, $notice)
|
function send_notice($screenname, $notice)
|
||||||
{
|
{
|
||||||
return $this->send_message($screenname, $this->format_notice($notice));
|
return $this->sendMessage($screenname, $this->format_notice($notice));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -101,7 +101,7 @@ abstract class ImPlugin extends Plugin
|
|||||||
*
|
*
|
||||||
* @return boolean success value
|
* @return boolean success value
|
||||||
*/
|
*/
|
||||||
abstract function send_message($screenname, $body);
|
abstract function sendMessage($screenname, $body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* receive a raw message
|
* receive a raw message
|
||||||
@ -249,7 +249,7 @@ abstract class ImPlugin extends Plugin
|
|||||||
protected function send_from_site($screenname, $msg)
|
protected function send_from_site($screenname, $msg)
|
||||||
{
|
{
|
||||||
$text = '['.common_config('site', 'name') . '] ' . $msg;
|
$text = '['.common_config('site', 'name') . '] ' . $msg;
|
||||||
$this->send_message($screenname, $text);
|
$this->sendMessage($screenname, $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -271,7 +271,7 @@ abstract class ImPlugin extends Plugin
|
|||||||
'or if you didn\'t request this confirmation, just ignore this message.'),
|
'or if you didn\'t request this confirmation, just ignore this message.'),
|
||||||
$user->nickname, common_config('site', 'name'), $this->getDisplayName(), common_local_url('confirmaddress', array('code' => $code)));
|
$user->nickname, common_config('site', 'name'), $this->getDisplayName(), common_local_url('confirmaddress', array('code' => $code)));
|
||||||
|
|
||||||
return $this->send_message($screenname, $body);
|
return $this->sendMessage($screenname, $body);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -119,7 +119,7 @@ class AimPlugin extends ImPlugin
|
|||||||
return 'aim:' . $screenname;
|
return 'aim:' . $screenname;
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_message($screenname, $body)
|
function sendMessage($screenname, $body)
|
||||||
{
|
{
|
||||||
$this->fake_aim->sendIm($screenname, $body);
|
$this->fake_aim->sendIm($screenname, $body);
|
||||||
$this->enqueue_outgoing_raw($this->fake_aim->would_be_sent);
|
$this->enqueue_outgoing_raw($this->fake_aim->would_be_sent);
|
||||||
|
@ -56,6 +56,6 @@ class ChannelResponseChannel extends IMChannel {
|
|||||||
*/
|
*/
|
||||||
public function output($user, $text) {
|
public function output($user, $text) {
|
||||||
$text = $user->nickname.': ['.common_config('site', 'name') . '] ' . $text;
|
$text = $user->nickname.': ['.common_config('site', 'name') . '] ' . $text;
|
||||||
$this->imPlugin->send_message($this->ircChannel, $text);
|
$this->imPlugin->sendMessage($this->ircChannel, $text);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -189,7 +189,7 @@ class IrcPlugin extends ImPlugin {
|
|||||||
* @param string $body Text to send
|
* @param string $body Text to send
|
||||||
* @return boolean true on success
|
* @return boolean true on success
|
||||||
*/
|
*/
|
||||||
public function send_message($screenname, $body) {
|
public function sendMessage($screenname, $body) {
|
||||||
$lines = explode("\n", $body);
|
$lines = explode("\n", $body);
|
||||||
foreach ($lines as $line) {
|
foreach ($lines as $line) {
|
||||||
$this->fake_irc->doPrivmsg($screenname, $line);
|
$this->fake_irc->doPrivmsg($screenname, $line);
|
||||||
@ -301,7 +301,7 @@ class IrcPlugin extends ImPlugin {
|
|||||||
if ($this->regcheck && !$checked) {
|
if ($this->regcheck && !$checked) {
|
||||||
return $this->checked_send_confirmation_code($screenname, $code, $user);
|
return $this->checked_send_confirmation_code($screenname, $code, $user);
|
||||||
} else {
|
} else {
|
||||||
return $this->send_message($screenname, $body);
|
return $this->sendMessage($screenname, $body);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ class IrcManager extends ImManager {
|
|||||||
// Send message
|
// Send message
|
||||||
$this->plugin->send_confirmation_code($screenname, $nickdata['code'], $nickdata['user'], true);
|
$this->plugin->send_confirmation_code($screenname, $nickdata['code'], $nickdata['user'], true);
|
||||||
} else {
|
} else {
|
||||||
$this->plugin->send_message($screenname, _m('Your nickname is not registered so IRC connectivity cannot be enabled'));
|
$this->plugin->sendMessage($screenname, _m('Your nickname is not registered so IRC connectivity cannot be enabled'));
|
||||||
|
|
||||||
$confirm = new Confirm_address();
|
$confirm = new Confirm_address();
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ class MsnPlugin extends ImPlugin {
|
|||||||
* @param string $body Text to send
|
* @param string $body Text to send
|
||||||
* @return boolean success value
|
* @return boolean success value
|
||||||
*/
|
*/
|
||||||
public function send_message($screenname, $body) {
|
public function sendMessage($screenname, $body) {
|
||||||
$this->enqueue_outgoing_raw(array('to' => $screenname, 'message' => $body));
|
$this->enqueue_outgoing_raw(array('to' => $screenname, 'message' => $body));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -175,10 +175,10 @@ class MsnManager extends ImManager {
|
|||||||
$wm = Msn_waiting_message::top($data['to']);
|
$wm = Msn_waiting_message::top($data['to']);
|
||||||
while ($wm != NULL) {
|
while ($wm != NULL) {
|
||||||
if ($sessionFailed) {
|
if ($sessionFailed) {
|
||||||
$this->plugin->send_message($wm->screenname, $wm->message);
|
$this->plugin->sendMessage($wm->screenname, $wm->message);
|
||||||
$sessionFailed = true;
|
$sessionFailed = true;
|
||||||
} elseif (!$this->conn->sendMessage($wm->screenname, $wm->message, $ignore)) {
|
} elseif (!$this->conn->sendMessage($wm->screenname, $wm->message, $ignore)) {
|
||||||
$this->plugin->send_message($wm->screenname, $wm->message);
|
$this->plugin->sendMessage($wm->screenname, $wm->message);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wm->delete();
|
$wm->delete();
|
||||||
@ -195,7 +195,7 @@ class MsnManager extends ImManager {
|
|||||||
protected function requeue_waiting_messages() {
|
protected function requeue_waiting_messages() {
|
||||||
$wm = Msn_waiting_message::top();
|
$wm = Msn_waiting_message::top();
|
||||||
while ($wm != NULL) {
|
while ($wm != NULL) {
|
||||||
$this->plugin->send_message($wm->screenname, $wm->message);
|
$this->plugin->sendMessage($wm->screenname, $wm->message);
|
||||||
$wm->delete();
|
$wm->delete();
|
||||||
$wm = Msn_waiting_message::top();
|
$wm = Msn_waiting_message::top();
|
||||||
}
|
}
|
||||||
|
@ -311,7 +311,7 @@ class XmppPlugin extends ImPlugin
|
|||||||
return 'xmpp:' . $screenname;
|
return 'xmpp:' . $screenname;
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_message($screenname, $body)
|
function sendMessage($screenname, $body)
|
||||||
{
|
{
|
||||||
$this->queuedConnection()->message($screenname, $body, 'chat');
|
$this->queuedConnection()->message($screenname, $body, 'chat');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user