changeset 2469:adcc35625e17

tools (common/data_objects): added Room class
author Goffi <goffi@goffi.org>
date Fri, 05 Jan 2018 13:00:34 +0100
parents 8f14c1865e9e
children 8084066ac95b
files src/tools/common/data_objects.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/tools/common/data_objects.py	Fri Jan 05 12:59:52 2018 +0100
+++ b/src/tools/common/data_objects.py	Fri Jan 05 13:00:34 2018 +0100
@@ -263,6 +263,14 @@
     def __contains__(self, item):
         return self.messages.__contains__(item)
 
+class Room(object):
+
+    def __init__(self, jid, name=None, url=None):
+        self.jid = jid
+        self.name = name or jid
+        if url is not None:
+            self.url = url
+
 
 class Identity(object):