Fix bad reference to function that does not exist and - hopefully - improve subscription handling
This commit is contained in:
parent
6c16fa4af1
commit
c568145ecf
2 changed files with 4 additions and 4 deletions
|
@ -245,7 +245,7 @@ class Slixfeed(slixmpp.ClientXMPP):
|
||||||
jid = message["from"].bare
|
jid = message["from"].bare
|
||||||
if (await get_chat_type(self, jid) == 'chat' and
|
if (await get_chat_type(self, jid) == 'chat' and
|
||||||
not self.client_roster[jid]['to']):
|
not self.client_roster[jid]['to']):
|
||||||
XmppPresence.subscribe(self, jid)
|
XmppPresence.subscription(self, jid, 'subscribe')
|
||||||
await XmppRoster.add(self, jid)
|
await XmppRoster.add(self, jid)
|
||||||
status_message = '✒️ Share online status to receive updates'
|
status_message = '✒️ Share online status to receive updates'
|
||||||
XmppPresence.send(self, jid, status_message)
|
XmppPresence.send(self, jid, status_message)
|
||||||
|
@ -270,7 +270,7 @@ class Slixfeed(slixmpp.ClientXMPP):
|
||||||
async def on_presence_subscribe(self, presence):
|
async def on_presence_subscribe(self, presence):
|
||||||
jid = presence['from'].bare
|
jid = presence['from'].bare
|
||||||
if not self.client_roster[jid]['to']:
|
if not self.client_roster[jid]['to']:
|
||||||
XmppPresence.subscription(self, jid, 'subscribe')
|
XmppPresence.subscription(self, jid, 'subscribed')
|
||||||
await XmppRoster.add(self, jid)
|
await XmppRoster.add(self, jid)
|
||||||
status_message = '✒️ Share online status to receive updates'
|
status_message = '✒️ Share online status to receive updates'
|
||||||
XmppPresence.send(self, jid, status_message)
|
XmppPresence.send(self, jid, status_message)
|
||||||
|
@ -309,7 +309,7 @@ class Slixfeed(slixmpp.ClientXMPP):
|
||||||
# status_message = '🖋️ Subscribe to receive updates'
|
# status_message = '🖋️ Subscribe to receive updates'
|
||||||
# status_message = None
|
# status_message = None
|
||||||
XmppMessage.send(self, jid, message_body, 'chat')
|
XmppMessage.send(self, jid, message_body, 'chat')
|
||||||
XmppPresence.subscription(self, jid, 'unsubscribe')
|
XmppPresence.subscription(self, jid, 'unsubscribed')
|
||||||
# XmppPresence.send(self, jid, status_message,
|
# XmppPresence.send(self, jid, status_message,
|
||||||
# presence_type='unsubscribed')
|
# presence_type='unsubscribed')
|
||||||
await XmppRoster.remove(self, jid)
|
await XmppRoster.remove(self, jid)
|
||||||
|
|
|
@ -255,7 +255,7 @@ class SlixfeedComponent(slixmpp.ComponentXMPP):
|
||||||
# status_message = '🖋️ Subscribe to receive updates'
|
# status_message = '🖋️ Subscribe to receive updates'
|
||||||
# status_message = None
|
# status_message = None
|
||||||
XmppMessage.send(self, jid, message_body, 'chat')
|
XmppMessage.send(self, jid, message_body, 'chat')
|
||||||
XmppPresence.subscription(self, jid, 'unsubscribe')
|
XmppPresence.subscription(self, jid, 'unsubscribed')
|
||||||
# XmppPresence.send(self, jid, status_message,
|
# XmppPresence.send(self, jid, status_message,
|
||||||
# presence_type='unsubscribed')
|
# presence_type='unsubscribed')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue