Skip to content

Commit

Permalink
fix(qchat): no notification on self message mention (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
gounux authored Sep 26, 2024
1 parent a21218d commit fcf39ac
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions qtribu/gui/dck_qchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,18 @@ def on_ws_message_received(self, message: str) -> None:
message["message"],
foreground_color=self.settings.qchat_color_mention,
)
self.log(
message=self.tr("You were mentionned by {sender}: {message}").format(
sender=message["author"], message=message["message"]
),
application=self.tr("QChat"),
log_level=Qgis.Info,
push=PlgOptionsManager().get_plg_settings().notify_push_info,
duration=PlgOptionsManager().get_plg_settings().notify_push_duration,
)
if message["author"] != self.settings.author_nickname:
self.log(
message=self.tr(
"You were mentionned by {sender}: {message}"
).format(sender=message["author"], message=message["message"]),
application=self.tr("QChat"),
log_level=Qgis.Info,
push=PlgOptionsManager().get_plg_settings().notify_push_info,
duration=PlgOptionsManager()
.get_plg_settings()
.notify_push_duration,
)
elif message["author"] == self.settings.author_nickname:
item = self.create_message_item(
message["author"],
Expand Down

0 comments on commit fcf39ac

Please sign in to comment.