diff options
author | fiaxh <git@lightrise.org> | 2020-10-27 15:31:39 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2020-10-27 16:05:30 +0100 |
commit | 2e0357877cf3e8e391d3f8f02970defa93c710eb (patch) | |
tree | 4478a0deebbedf00934c7a7d6324180c4158bb38 /libdino/src/service/notification_events.vala | |
parent | edbc8f794d42cc30bfbe6602becb43c3500e02a2 (diff) | |
download | dino-2e0357877cf3e8e391d3f8f02970defa93c710eb.tar.gz dino-2e0357877cf3e8e391d3f8f02970defa93c710eb.zip |
Fix some compiler warnings
Diffstat (limited to 'libdino/src/service/notification_events.vala')
-rw-r--r-- | libdino/src/service/notification_events.vala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libdino/src/service/notification_events.vala b/libdino/src/service/notification_events.vala index 5e81ff89..19d61d0f 100644 --- a/libdino/src/service/notification_events.vala +++ b/libdino/src/service/notification_events.vala @@ -49,11 +49,11 @@ public class NotificationEvents : StreamInteractionModule, Object { switch (content_item.type_) { case MessageItem.TYPE: - Message message = (content_item as MessageItem).message; + Message message = ((MessageItem) content_item).message; if (message.direction == Message.DIRECTION_SENT) return false; break; case FileItem.TYPE: - FileTransfer file_transfer = (content_item as FileItem).file_transfer; + FileTransfer file_transfer = ((FileItem) content_item).file_transfer; // Don't notify on file transfers in a groupchat set to "mention only" if (notify == Conversation.NotifySetting.HIGHLIGHT) return false; if (file_transfer.direction == FileTransfer.DIRECTION_SENT) return false; @@ -64,7 +64,7 @@ public class NotificationEvents : StreamInteractionModule, Object { Jid? nick = stream_interactor.get_module(MucManager.IDENTITY).get_own_jid(conversation.counterpart, conversation.account); if (nick == null) return false; - Entities.Message message = (content_item as MessageItem).message; + Entities.Message message = ((MessageItem) content_item).message; return Regex.match_simple("\\b" + Regex.escape_string(nick.resourcepart) + "\\b", message.body, RegexCompileFlags.CASELESS); } return true; |