aboutsummaryrefslogtreecommitdiff
path: root/room.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'room.cpp')
-rw-r--r--room.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/room.cpp b/room.cpp
index 86d1e6cd..cb94ddb6 100644
--- a/room.cpp
+++ b/room.cpp
@@ -586,6 +586,26 @@ TagRecord Room::tag(const QString& name) const
return d->tags.value(name);
}
+void Room::addTag(const QString& name, const TagRecord& record)
+{
+ if (d->tags.contains(name))
+ return;
+
+ d->tags.insert(name, record);
+ d->setAccountData(TagEvent(d->tags));
+ emit tagsChanged();
+}
+
+void Room::removeTag(const QString& name)
+{
+ if (!d->tags.contains(name))
+ return;
+
+ d->tags.remove(name);
+ d->setAccountData(TagEvent(d->tags));
+ emit tagsChanged();
+}
+
void Room::setTags(const TagsMap& newTags)
{
if (newTags == d->tags)