diff --git a/include/class.thread.php b/include/class.thread.php
index 7c5635bd420aa9b64b5b4dc8d7202507f474210f..5983988607b2304fdee913bc3fe8d87ee7463b4a 100644
--- a/include/class.thread.php
+++ b/include/class.thread.php
@@ -65,8 +65,17 @@ class Thread {
         return $this->ht['object_type'];
     }
 
-    function getObjectId() {
-        return $this->ht['object_id'];
+    function getObject() {
+
+        if (!$this->_object)
+            $this->_object = ObjectModel::lookup(
+                    $this->getObjectId(), $this->getObjectType());
+
+        return $this->_object;
+    }
+
+    function getNumAttachments() {
+        return $this->ht['attachments'];
     }
 
     function getNumEntries() {