public $server = null;
public $port = 5222;
public $user = 'update';
- public $resource = null;
+ public $resource = 'gnusocial';
public $encryption = true;
public $password = null;
public $host = null; // only set if != server
function getDisplayName(){
// TRANS: Plugin display name.
- return _m('XMPP/Jabber/GTalk');
+ return _m('XMPP/Jabber');
}
/**
return true;
}
- function microiduri($screenname)
- {
- return 'xmpp:' . $screenname;
- }
-
function sendMessage($screenname, $body)
{
$this->queuedConnection()->message($screenname, $body, 'chat');
}
- function sendNotice($screenname, $notice)
+ function sendNotice($screenname, Notice $notice)
{
$msg = $this->formatNotice($notice);
$entry = $this->format_entry($notice);
$xs->elementStart('body', array('xmlns' => 'http://www.w3.org/1999/xhtml'));
$xs->element('a', array('href' => $profile->profileurl), $profile->nickname);
try {
- $orig_profile = $notice->getParent()->getProfile();
+ $parent = $notice->getParent();
+ $orig_profile = $parent->getProfile();
$orig_profurl = $orig_profile->getUrl();
$xs->text(" => ");
$xs->element('a', array('href' => $orig_profurl), $orig_profile->nickname);
$xs->text(": ");
} catch (InvalidUrlException $e) {
$xs->text(sprintf(' => %s', $orig_profile->nickname));
- } catch (Exception $e) {
+ } catch (NoParentNoticeException $e) {
+ $xs->text(": ");
+ } catch (NoResultException $e) {
+ // Parent notice was probably deleted.
$xs->text(": ");
}
if (!empty($notice->rendered)) {
}
- function onPluginVersion(&$versions)
+ function onPluginVersion(array &$versions)
{
$versions[] = array('name' => 'XMPP',
- 'version' => STATUSNET_VERSION,
+ 'version' => GNUSOCIAL_VERSION,
'author' => 'Craig Andrews, Evan Prodromou',
'homepage' => 'http://status.net/wiki/Plugin:XMPP',
'rawdescription' =>