diff --git a/purple/purplexpcom/public/purpleIConversation.idl b/purple/purplexpcom/public/purpleIConversation.idl index 43fc75e1c4..e04e5e91fa 100644 --- a/purple/purplexpcom/public/purpleIConversation.idl +++ b/purple/purplexpcom/public/purpleIConversation.idl @@ -122,12 +122,16 @@ interface purpleIConvChat: purpleIConversation { The list of people participating in this chat */ nsISimpleEnumerator getParticipants(); - /* The topic of this chat room (FIXME settable?) */ - readonly attribute AUTF8String topic; + /* The topic of this chat room */ + attribute AUTF8String topic; /* The name/nick of the person who set the topic */ readonly attribute AUTF8String topicSetter; + /* Whether the protocol plugin can set a topic. Doesn't check that + the user has the necessary rights in the current conversation. */ + readonly attribute boolean topicSettable; + /* The nick seen by other people in the room */ readonly attribute AUTF8String nick; diff --git a/purple/purplexpcom/src/imConversations.js b/purple/purplexpcom/src/imConversations.js index 217839a21e..95b88c447d 100644 --- a/purple/purplexpcom/src/imConversations.js +++ b/purple/purplexpcom/src/imConversations.js @@ -270,7 +270,9 @@ UIConversation.prototype = { // Chat only getParticipants: function() this.target.getParticipants(), get topic() this.target.topic, + set topic(aTopic) { this.target.topic = aTopic; }, get topicSetter() this.target.topicSetter, + get topicSettable() this.target.topicSettable, get nick() this.target.nick, get left() this.target.left }; diff --git a/purple/purplexpcom/src/jsProtoHelper.jsm b/purple/purplexpcom/src/jsProtoHelper.jsm index 95435a096d..482fcb74e7 100644 --- a/purple/purplexpcom/src/jsProtoHelper.jsm +++ b/purple/purplexpcom/src/jsProtoHelper.jsm @@ -554,6 +554,7 @@ const GenericConvChatPrototype = { get nick() this._nick, get topic() this._topic, get topicSetter() this._topicSetter, + get topicSettable() false, get left() false, getParticipants: function() {