diff options
author | mathieui <mathieui@mathieui.net> | 2011-11-26 23:09:03 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2011-11-26 23:09:03 +0100 |
commit | 2ff8e40c22dc590b8fc128821c2a5091dbd4624a (patch) | |
tree | f2ad17bcdc1c97dce18169c24fba578148187c83 /src/bookmark.py | |
parent | 68c0ddeb299d30d0f5dc5502489ca882369ecc8b (diff) | |
download | poezio-2ff8e40c22dc590b8fc128821c2a5091dbd4624a.tar.gz poezio-2ff8e40c22dc590b8fc128821c2a5091dbd4624a.tar.bz2 poezio-2ff8e40c22dc590b8fc128821c2a5091dbd4624a.tar.xz poezio-2ff8e40c22dc590b8fc128821c2a5091dbd4624a.zip |
Add stanza generators for the <storage/> element
Diffstat (limited to 'src/bookmark.py')
-rw-r--r-- | src/bookmark.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bookmark.py b/src/bookmark.py index 67ef5eba..019452eb 100644 --- a/src/bookmark.py +++ b/src/bookmark.py @@ -92,6 +92,18 @@ def remove(value): value = get_by_jid(value) bookmarks.remove(value) +def stanza_pep(): + storage = Storage() + for b in filter(lambda b: b.method == 'pep', bookmarks): + storage.append(b.stanza()) + return storage + +def stanza_privatexml(): + storage = Storage() + for b in filter(lambda b: b.method == 'privatexml', bookmarks): + storage.append(b.stanza()) + return storage + def save_pep(xmpp): xmpp.plugin['xep_0048'].set_bookmarks(stanza_pep()) |