$replier_profile = null;
if ($this->notice->reply_to) {
- $reply = Notice::staticGet(intval($this->notice->reply_to));
+ $reply = Notice::getKV(intval($this->notice->reply_to));
if ($reply) {
$replier_profile = $reply->getProfile();
}
$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);
case 'api':
break;
default:
- $ns = Notice_source::staticGet($source);
+ $ns = Notice_source::getKV($source);
if ($ns) {
$source_name = '<a href="' . $ns->url . '">' . $ns->name . '</a>';
}