← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~lgp171188/launchpad:export-IMessage.visible into launchpad:master

 

Guruprasad has proposed merging ~lgp171188/launchpad:export-IMessage.visible into launchpad:master.

Commit message:
Export IMessage.visible in the web service

And remove the downstream exports.


Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~lgp171188/launchpad/+git/launchpad/+merge/451817
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/launchpad:export-IMessage.visible into launchpad:master.
diff --git a/lib/lp/answers/interfaces/questionmessage.py b/lib/lp/answers/interfaces/questionmessage.py
index a35a787..e9f8610 100644
--- a/lib/lp/answers/interfaces/questionmessage.py
+++ b/lib/lp/answers/interfaces/questionmessage.py
@@ -10,7 +10,7 @@ __all__ = [
 from lazr.restful.declarations import exported, exported_as_webservice_entry
 from lazr.restful.fields import Reference
 from zope.interface import Interface
-from zope.schema import Bool, Choice, Int
+from zope.schema import Choice, Int
 
 from lp import _
 from lp.answers.enums import QuestionAction, QuestionStatus
@@ -74,14 +74,6 @@ class IQuestionMessageView(IMessageView):
         ),
         exported_as="index",
     )
-    visible = exported(
-        Bool(
-            title=_("Message visibility."),
-            description=_("Whether or not the message is visible."),
-            readonly=True,
-        ),
-        as_of="devel",
-    )
 
 
 @exported_as_webservice_entry(as_of="devel")
diff --git a/lib/lp/services/messages/interfaces/message.py b/lib/lp/services/messages/interfaces/message.py
index 354a84e..31525df 100644
--- a/lib/lp/services/messages/interfaces/message.py
+++ b/lib/lp/services/messages/interfaces/message.py
@@ -161,8 +161,14 @@ class IMessageView(IMessageCommon):
     title = TextLine(
         title=_("The message title, usually just the subject."), readonly=True
     )
-    visible = Bool(
-        title="This message is visible or not.", required=False, default=True
+    visible = exported(
+        Bool(
+            title=_("Message visibility."),
+            description=_("Whether or not the message is visible."),
+            readonly=True,
+            default=True,
+        ),
+        as_of="devel",
     )
 
     bugattachments = exported(