Giter Site home page Giter Site logo

mock-foundation / moc Goto Github PK

View Code? Open in Web Editor NEW
118.0 4.0 6.0 42.64 MB

A (really) native and powerful macOS and iPadOS Telegram client, optimized for moderating large communities and personal use. Currently in alpha

License: GNU General Public License v3.0

Swift 99.86% Shell 0.14%
telegram tdlib swift swiftui macos ipados

moc's Introduction

Moc

A (really) native and powerful Telegram client for macOS and iPadOS, optimized for moderating large communities and personal use.

Build app GPLv3 License Github All Releases Crowdin

SWUbanner

This client is currently in development and barely usable. You can track progress by observing the project table, issues, pull requests, and a Telegram channel (russian, and soon ukrainian).

Project roadmap: Craft

If you have any questions, ask them in Discussions on GitHub, or in a Telegram group (ukrainian/russian). You are strongly encoruaged to use Discussions and the Telegram group instead of Issues for questions. Bug reports and stuff go to Issues. There is a reason why GitHub created Discussions in the first place :D

Installation

You can install the latest release using Homebrew, GitHub, and MS AppCenter:

Homebrew

This is a preferred method of installation:

brew install --cask ggoraa/apps/moc

By the way, Moc will soon move from a custom tap to an official one, homebrew-casks!

GitHub

You can find any release in the Releases page of this repository.

AppCenter

You can also find releases from MS AppCenter Moc page. By the way, this is a place from which the in-app updated fetches updates :)

OS support

Moc's OS support model is N-1, which means "latest and previous major release", for example macOS 13 and 12. When there is a new OS release announced, Moc will get ready to drop support for an oldest release. For example, if there is macOS 13 and 12 supported, and then macOS 14 is announced, the development team will start to remove code for supporting the macOS 12 release, and a new release with macOS 12 support removed will be available right after a stable release of macOS 14.

Notes on iPadOS support

Support for iPads is currently very experimental and not tested much. Why? Because I don't have a physical device to do so, and my development Mac is too underpowered for running Simulators with good enough performance. But still, support for iPadOS is a thing that I ocasionally pay attention to, so yeah

If someone wants to donate me an iPad (lol who is gonna do that), use the Funding list in this repo

Screenshots

Contributing

If you want to contribute a new feature, please make sure you have read the project roadmap. This may guide you what are current goals of the project :D

WARNING: Ensure you have Commit Signing set up, because otherwise your commits will be rejected by GitHub (not even me!).

Building

Step 1 - Clone

Use the command below to clone the repo:

git clone https://github.com/mock-foundation/moc.git 

Step 2 - Download right version of Xcode

The development is going with Xcode 14. You can download it from Apple Developer, or using Xcodes (app (recommended) or cli).

Step 3 - Obtain api_id and api_hash

They can be obtained here. Log in, open API development tools, and fill up needed info. Then click Save changes at the bottom of the page. Leave the page open, this will be needed in the next step!

Step 4 - Set up development environment

Be sure that you have Homebrew installed, because it is used a lot here.

Now run these commands:

brew install go-task/tap/go-task
API_ID=<api_id> API_HASH=<api_hash> task setup

You can execute task setup:full if you want to also fetch SPM packages and open Xcode.

Done! You have everything set up. You can now build Moc ๐Ÿ˜

moc's People

Contributors

dmikots avatar ggoraa avatar ih3xcode avatar imgbot[bot] avatar imgbotapp avatar kylmakalle avatar levochkaa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

moc's Issues

Add some test coverage

At least partial test coverage will definitely help in development, so I can spot bugs before they end up in a release build

And I also need to learn how to do UI tests with SwiftUI

This will not get tied to a specific milestone or something, it's just a task to do

Related

#90
#93

Login view is not opening when the session was terminated remotely

Explanation

When you terminate Moc's session from another device, the login view will be not shown.

Cause

The only update that triggers the login screen is authorizarionStateWaitPhoneNumber. When session terminates, a authorizationStateClosed update is sent. So, we need to handle that state too, to make it work.

Fix chat info in inspector

Also this issue will have a task for being able to open chat info not from an inspector, but by clicking on the chat title in toolbar

Basic chat UI

A user interface for viewing chats, with abilities to:

  • Render messages from recipients and from me the right way(for e.g. blue bubbles from me and grey from recipients)
  • Show recipient photo
  • For other messages display the "Not supported" message
  • Sidebar with inspector

Possibly replace List with NSTableView wrapper

The reason for this change is simple: performance (and swipe actions)

Performance can be easily demonstrated here: https://kean.blog/post/not-list

And with swipe actions, they are available only on three-column NavigationView layout(idk why lol), but I don't have a NavigationView, it is replaced by a custom solution, so I lack swipe actions

Only benefits my people, only benefits

I think it will be implemented in 0.2.0 milestone release

App crashes when trying to display certain messages

Culprit: Media thumbnail generation. It uses the file extension to determine the file type, and then go next, but it's not a viable way to do this, it should instead look at the MIME type of the file, or at least handle the nil when making an instance of UTType from the path extension

Create a custom About screen

This feature will possibly be available only for macOS Ventura, because of the new Window APIs that were introduced there

Implement better architecture

Let's use Resolver library to it's final potential, shall we?
Direct tdApi calls in views are not good, in fact, it really bad. How it should be replaced:

Example: we have a chat view. It should show messages, and populate the status bar and other things.
For that, there should be a variable:

@Injected private var dataSource: ChatDataSourcable

Where ChatDataSourcable is:

protocol ChatDataSourcable

Why? Simple: Previews and testing!
We can easily create something like:

final class TdChatDataSource: ChatDataSourcable

Which will have a real implementation with real data, and also:

final class MockChatDataSource: ChatDataSourcable

For using in Previews and testing.
Each instance can be easily injected using:

Resolver.register { TdChatDataSource() as ChatDataSourcable }

I think benefits are huge for this one :D

Update TDLib to it's latest version

This task includes replacing Swiftgram's distribution of TDLibKit with Mock Foundation's, and a lot of code updates for new API changes, like the new updateStream API.

Fully implement logic process

Thing that are needed to be done are request for an SMS for the code, get code using a phone call, and other stuff

Crash on Moc's session being remotely terminated

When Moc is running, and its session was terminated by another device, it just outright crashes

Reason

The reason is the handling of AuthorizationState.closed state and the reinstantiation of the TDLib instance, which, as we see, fails miserably.

Login UI

Currently the login UI is in bare-bones state. It should be fully implemented

Migrate from custom Message models to TDLib ones

Why? Well, it will result in better performance, because the message content loading will be done by MessageView lazily (thanks to LazyVStack), compared to how it is now when all messages are loaded when a user opens a chat. Pretty good reasons to do so tbh

add to brew ?

do you have plans to add moc to brew.sh ? presumably a bit further in development, do you have a mvp ?

Improve the code field design

I have found a really cool implementation of the 2FA field in RobotsAndPencils/XcodesApp, which looks similar to how 2FA works in Apple apps and also Telegram's official clients.

I will just steal I mean borrow some code from that repo, and tweak it a little so it looks cool

And obviously place credits to @RobotsAndPencils, because it will just be nice to do that

Add user id color tint for replies

Currently, they are always blue, but in official clients (at least on iOS) it's also colored the same way as message sender names and profile image placeholders, so that should be in Moc

Settings menu

A settings menu should be the same as in other native apps, like Xcode, Messages(formerly known as iMessage), Music, and others: a button in menubar under the app name called "Settings", which creates a window with setting categories on top in toolbar as tabs, and window automatically resizing on change of selected setting category.

Reserved for 0.2.0 milestone. Possibly will be transferred to 0.1.0

Unable to send messages with line breaks

If I type Ctrl+Return, it will look like I added a line break, but when sending the message, there are no line breaks, which is strange

Anyways, it should be fixed

Rework how the UI works

IMO, views in SwiftUI should be done like components, so they can be easily reusable in any place, which currently is not how things work. I mean yes, there is MessageView, where you just give it a Message instance, and it renders the message, except it doesn't, it doesn't only make a message, it also adds specific padding to it so it can only be used inside of ChatView, which is definitely bad, ChatView should do that instead.

So yes, views should be rewritten drastically, to make the code more maintainable and reusable.

This task can be done in Stage 2, but can be delayed to Stage 3, just because of it's sheer size.

How can I fix an extraction error with Swiftgram's TDLib framework during build?

Discussed in #37

Originally posted by S0ulf3re January 26, 2022
I really want to try and help contribute this project because I personally don't like the default telegram client for Mac and I've been trying to learn swift ever since July of last year. I tried opening the project, but I got an error which has caused a bunch of other build time errors to occur. How can I fix all this?

Here's a log from Xcode
Resolve Packages_2022-01-26T12-44-01.txt


This should be fixed ASAP

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.