Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Option to only log publish messages to history" #96

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions hookbox/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class Channel(object):
'reflective': True,
'history': [],
'history_size': 0,
'history_publish_only': False,
'moderated': True,
'moderated_publish': False,
'moderated_subscribe': False,
Expand Down Expand Up @@ -228,7 +227,7 @@ def subscribe(self, user, conn=None, needs_auth=True):

user.send_frame('SUBSCRIBE', frame)

if self.history_size and not self.history_publish_only:
if self.history_size:
self.history.append(('SUBSCRIBE', {"user": user.get_name(), "datetime": _now }))
self.prune_history()

Expand Down Expand Up @@ -320,7 +319,7 @@ def unsubscribe(self, user, conn=None, needs_auth=True, force_auth=False):
user.send_frame('UNSUBSCRIBE', frame)
self.subscribers.remove(user)
user.channel_unsubscribed(self)
if self.history_size and not self.history_publish_only:
if self.history_size:
del frame['channel_name']
self.history.append(('UNSUBSCRIBE', frame))
self.prune_history()
Expand Down