Your message dated Tue, 13 Feb 2018 06:02:05 +0000
with message-id <e1eltfj-0007sb...@fasolo.debian.org>
and subject line Bug#742601: Removed package(s) from unstable
has caused the Debian Bug report #742269,
regarding [feed2omb] reconnect after any message fix
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
742269: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742269
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: feed2omb
Version: 0.9.2-1
Severity: wishlist
Tags: patch

Hi,

after some playing with this nice piece of the software, i see
that the XMPP support is very basic only. For my purposes i did
two improvements:

1) connect (and authenticate) only once, not after any message
   (see the attached stay-connected.patch)
2) allow send messages to the XMPP MUC room (see the attached
   post-to-muc.patch)

The second one adds two configuration options (the sample.config
patched too), to allow set the room JID and the nick name for access
into MUC.

regards

-- 
Slavko
http://slavino.sk
Description: prevent closing XMPP connection between messages
Author: Slavko <li...@slavino.sk>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- feed2omb-0.9.2.orig/feed2omb.py
+++ feed2omb-0.9.2/feed2omb.py
@@ -423,10 +423,16 @@ for thisconfig in args:
                         #currently!
 
                         jid = xmpp.protocol.JID(config['xmpp_jid'])
-                        client = xmpp.Client(jid.getDomain(), debug=[])
-                        con = client.connect()
-                        client.auth(jid.getNode(), config['xmpp_password'],
-                            resource="feed2omb")
+                        # check client variable existence
+                        try:
+                            client
+                        except NameError:
+                            # create client and connect, only if not connected
+                            client = xmpp.Client(jid.getDomain(), debug=[])
+                            con = client.connect()
+                            client.auth(jid.getNode(), config['xmpp_password'],
+                                resource="feed2omb")
+                        
                         client.send(xmpp.protocol.Message(config['xmpp_to'],
                             text))
 
Description: allow post messages into XMPP MUC room
Author: Slavko <li...@slavino.sk>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- feed2omb-0.9.2.orig/feed2omb.py
+++ feed2omb-0.9.2/feed2omb.py
@@ -432,9 +432,21 @@ for thisconfig in args:
                             con = client.connect()
                             client.auth(jid.getNode(), config['xmpp_password'],
                                 resource="feed2omb")
-                        
-                        client.send(xmpp.protocol.Message(config['xmpp_to'],
-                            text))
+                            # if post to room, join the room, only once too
+                            if 'xmpp_room' in config and config['xmpp_room'] != "" and \
+                               'xmpp_nick' in config and config['xmpp_nick'] != "":
+                                client.send(xmpp.Presence(to="%s/%s" % (config['xmpp_room'], config['xmpp_nick'])))
+
+                        # send message to room or to the JID
+                        if 'xmpp_room' in config and config['xmpp_room'] != "" and \
+                           'xmpp_nick' in config and config['xmpp_nick'] != "":
+                            msg = xmpp.protocol.Message(body=text)
+                            msg.setTo(config['xmpp_room'])
+                            msg.setType('groupchat')
+                            client.send(msg)
+                        else:
+                            client.send(xmpp.protocol.Message(config['xmpp_to'],
+                                text))
 
             #Record that we have sent this entry...
             if sentmode == 'timestamp':
--- feed2omb-0.9.2.orig/sample.config
+++ feed2omb-0.9.2/sample.config
@@ -29,6 +29,11 @@ xmpp_password = 1234
 #Where to send the XMPP messages
 xmpp_to = d...@another.example.com
 
+#Room where to send the XMPP messages
+xmpp_room = deb...@xmpp.slavino.sk
+
+#Nick for room access
+xmpp_nick = feedbot
 
 #The maximum length of message. Defaults to 140.
 maxlen = 140

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Version: 0.9.2-1+rm

Dear submitter,

as the package feed2omb has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/742601

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmas...@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply via email to