if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
define('STATUSNET_BASE_VERSION', '1.1.0');
-define('STATUSNET_LIFECYCLE', 'alpha1'); // 'dev', 'alpha[0-9]+', 'beta[0-9]+', 'rc[0-9]+', 'release'
+define('STATUSNET_LIFECYCLE', 'release'); // 'dev', 'alpha[0-9]+', 'beta[0-9]+', 'rc[0-9]+', 'release'
define('STATUSNET_VERSION', STATUSNET_BASE_VERSION . '-' . STATUSNET_LIFECYCLE);
define('LACONICA_VERSION', STATUSNET_VERSION); // compatibility
$this->id = $this->notice->id;
$this->from_user_id = $this->profile->id;
- $user = User::staticGet('id', $this->profile->id);
-
- $this->iso_language_code = $user->language;
+ $user = $this->profile->getUser();
+ if (empty($user)) {
+ // Gonna have to do till we can detect it
+ $this->iso_language_code = common_config('site', 'language');
+ } else {
+ $this->iso_language_code = $user->language;
+ }
+
$this->source = $this->getSourceLink($this->notice->source);
$avatar = $this->profile->getAvatar(AVATAR_STREAM_SIZE);
"Cordiali saluti,\n"
"\n"
"%2$s\n"
-" "
#. TRANS: E-mail subject. %s is the StatusNet sitename.
#, php-format
list($action, $arg1, $arg2) = $path;
$channels = Realtime_channel::getAllChannels($action, $arg1, $arg2);
+ $this->log(LOG_INFO, sprintf(_("%d candidate channels for notice %d"),
+ count($channels),
+ $notice->id));
foreach ($channels as $channel) {
$profile = Profile::staticGet('id', $channel->user_id);
}
if ($notice->inScope($profile)) {
+ $this->log(LOG_INFO,
+ sprintf(_("Delivering notice %d to channel (%s, %s, %s) for user '%s'"),
+ $notice->id,
+ $channel->action,
+ $channel->arg1,
+ $channel->arg2,
+ ($profile) ? ($profile->nickname) : "<public>"));
$timeline = $this->_pathToChannel(array($channel->channel_key));
$this->_publish($timeline, $json);
}