don't bother with subscription hoohaw; just ask the user to do it
darcs-hash:20080626203103-34904-19ef53bc734622a310a705608f3e227e2f387904.gz
This commit is contained in:
parent
31b5ae1523
commit
48cac45fd9
|
@ -73,7 +73,9 @@ class ImsettingsAction extends SettingsAction {
|
|||
} else {
|
||||
common_input('jabber', _t('IM Address'),
|
||||
($this->arg('jabber')) ? $this->arg('jabber') : NULL,
|
||||
_t('Jabber or GTalk address, like "UserName@example.org"'));
|
||||
_t('Jabber or GTalk address, like "UserName@example.org". ' .
|
||||
'Make sure to subscribe to ' . jabber_daemon_address() .
|
||||
' before adding your IM address here.'));
|
||||
common_submit('add', 'Add');
|
||||
}
|
||||
}
|
||||
|
@ -192,21 +194,19 @@ class ImsettingsAction extends SettingsAction {
|
|||
return;
|
||||
}
|
||||
|
||||
# XXX: optionally queue for offline sending
|
||||
# XXX: queue for offline sending
|
||||
|
||||
if (!jabber_is_subscribed($jabber)) {
|
||||
jabber_special_presence('subscribe', $jabber);
|
||||
} else {
|
||||
jabber_confirm_address($confirm->code,
|
||||
$user->nickname,
|
||||
$jabber);
|
||||
}
|
||||
jabber_confirm_address($confirm->code,
|
||||
$user->nickname,
|
||||
$jabber);
|
||||
|
||||
$this->show_form(_t('A confirmation code was ' .
|
||||
' sent to the IM address you added. ' .
|
||||
' You must approve ' . jabber_daemon_address() .
|
||||
' for sending messages to you.'),
|
||||
TRUE);
|
||||
# XXX: I18N
|
||||
|
||||
$msg = 'A confirmation code was sent to the IM address you added. ' .
|
||||
' You must approve ' . jabber_daemon_address() .
|
||||
' for sending messages to you.';
|
||||
|
||||
$this->show_form($msg, TRUE);
|
||||
}
|
||||
|
||||
function cancel_confirmation() {
|
||||
|
|
|
@ -142,8 +142,3 @@ function jabber_broadcast_notice($notice) {
|
|||
function jabber_format_notice(&$profile, &$notice) {
|
||||
return $profile->nickname . ': ' . $notice->content;
|
||||
}
|
||||
|
||||
# Dike this out for now
|
||||
function jabber_is_subscribed($address) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -194,30 +194,7 @@ class XMPPDaemon {
|
|||
'Accepted subscription from ' . $from);
|
||||
break;
|
||||
case 'subscribed':
|
||||
$confirm = $this->get_confirmation($from);
|
||||
if ($confirm) {
|
||||
$user = User::staticGet($confirm->user_id);
|
||||
if ($user) {
|
||||
jabber_confirm_address($confirm->code,
|
||||
$user->nickname,
|
||||
$confirm->address);
|
||||
} else {
|
||||
$this->log(LOG_WARNING,
|
||||
'got unexpected subscribed message from ' . $from);
|
||||
}
|
||||
}
|
||||
case 'unsubscribed':
|
||||
$user = $this->get_user($from);
|
||||
if ($user) {
|
||||
$this->set_notify($user, false);
|
||||
}
|
||||
|
||||
$confirm = $this->get_confirmation($from);
|
||||
if ($confirm) {
|
||||
$user = User::staticGet($confirm->user_id);
|
||||
if ($user) {
|
||||
}
|
||||
}
|
||||
case 'unsubscribe':
|
||||
$this->log(LOG_INFO,
|
||||
'Ignoring "' . $pl['type'] . '" from ' . $from);
|
||||
|
|
Loading…
Reference in New Issue
Block a user