Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
boke0 committed Mar 24, 2021
1 parent 67ff8cd commit 48d1ce4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mitama/app/static/mitama-style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions mitama/models/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ def set_password(self, password):

def mail(self, subject, body, type="html"):
self._project.send_mail(self.email, subject, body, type)
try:
self.event["mail"](subject, body, type)
except Exception:
pass

def get_jwt(self):
nonce = "".join([str(random.randint(0, 9)) for i in range(16)])
Expand Down Expand Up @@ -320,6 +324,14 @@ def is_ancestor(self, node):
def push(self, data):
for subscription in self.subscriptions:
subscription.push(data)
try:
self.event["push"](data)
except Exception:
pass


User.listen("push")



class Group(AbstractNode, db.Model):
Expand Down
2 changes: 1 addition & 1 deletion scss/list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
.icon {
width: 40px;
height: 40px;
border-radius: 16px;
border-radius: 4px;
}
.screen-name {
font-size: 0.9rem;
Expand Down

0 comments on commit 48d1ce4

Please sign in to comment.