Esempio n. 1
0
def tag_source(event):
    watches = []
    for topic in event.topics:
        for (tag, count) in topic.tags:
            watches = watchlist.traverse_watchlist(tag)
    for watch in set(watches):
        yield Notification(event, watch.user, watch=watch)
Esempio n. 2
0
def comment_source(event):
    if event.event == T_COMMENT_EDIT:
        for revision in event.comment.revisions:
            yield Notification(event, revision.user, type=N_COMMENT_EDIT)
    if 'comment' in event.data:
        for watch in watchlist.traverse_watchlist(event.comment):
            yield Notification(event, watch.user, watch=watch)
Esempio n. 3
0
def tag_source(event):
    watches = []
    for topic in event.topics:
        for (tag, count) in topic.tags:
            watches = watchlist.traverse_watchlist(tag)
    for watch in set(watches):
        yield Notification(event, watch.user, watch=watch)
Esempio n. 4
0
def comment_source(event):
    if event.event == T_COMMENT_EDIT:
        for revision in event.comment.revisions:
            yield Notification(event,
                               revision.user,
                               type=N_COMMENT_EDIT)
    if 'comment' in event.data:
        for watch in watchlist.traverse_watchlist(event.comment):
            yield Notification(event, watch.user, watch=watch)
Esempio n. 5
0
def watchlist_source(event):
    watches = watchlist.traverse_watchlist(event.user)
    for topic in event.topics:
        watches += watchlist.traverse_watchlist(topic)
    for watch in watches:
        yield Notification(event, watch.user, watch=watch)
Esempio n. 6
0
def watchlist_source(event):
    watches = watchlist.traverse_watchlist(event.user)
    for topic in event.topics:
        watches += watchlist.traverse_watchlist(topic)
    for watch in watches:
        yield Notification(event, watch.user, watch=watch)