jonasmuehlmann / bib_vpr Goto Github PK
View Code? Open in Web Editor NEWA group messaging service inspired by Discord and Microsoft Teams.
A group messaging service inspired by Discord and Microsoft Teams.
Einem User sollte es möglich sein bei der Registrierung aber auch später, zu jeder Zeit, seinen Namen ändern zu können.
- [ ] Namensvergabe bei Registrierung
Depends on #6
Some methods use try-catch
blocks for error handling, but most do not.
Depends on:
#99
To allow duplicated Usernames while enabling the differentiation of usernames, we should implement a NameId.
This NameId would have 3 digits and be shown after the username.
This allows having the users Jonas#001, Jonas#002, etc..
Steps::
CREATE TABLE Reactions(
Id INT IDENTITY(1,1),
MessageId INT FOREIGN KEY REFERENCES Messages(messageId) NOT NULL,
Reaction NVARCHAR(8) NOT NULL,
Count INT NOT NULL
)
CREATE OR ALTER PROCEDURE AddOrUpdateReaction @messageId INT, @reaction NVARCHAR(8)
AS
BEGIN
IF Exists(SELECT * FROM Reactions WHERE Reaction = @reaction AND messageID = @messageId)
BEGIN
UPDATE
REACTIONS
SET
Count = Count + 1
WHERE
messageID = @messageId
AND
reaction = @reaction;
SELECT
Id
FROM
Reactions
WHERE
messageID = @messageId
AND
reaction = @reaction;
END
ELSE
BEGIN
INSERT INTO
Reactions
VALUES(@messageId, @reaction, 1);
SELECT SCOPE_IDENTITY();
END;
END;
CREATE OR ALTER PROCEDURE RemoveOrUpdateReaction @messageId INT, @reaction NVARCHAR(8)
AS
BEGIN
IF (SELECT r.Count FROM Reactions r WHERE Reaction = @reaction AND messageID = @messageId) = 1
BEGIN
DELETE FROM
Reactions
WHERE
messageID = @messageId
AND
reaction = @reaction;
END
ELSE
BEGIN
UPDATE
REACTIONS
SET
Count = Count - 1
WHERE
Reaction = @reaction;
END
END;
Backend tasks:
bool Message.AddReaction(uint messageId, string reaction)
bool Message.RemoveReaction(uint messageId, string reaction)
Dictionary<string, int> Message.RetrieveReactions(uint messageId)
Frontend tasks:
Help wanted on:
Instead of using catch (Exception e)
when doing error checking on SQL actions, we should use catch (SqlException e)
.
catch (Exception e)
is an anti-pattern and makes debugging false application behaviour harder than it needs to be, because we also catch errors, which we should not actually catch and don't even handle.
Singleton.cs
should provide one global pre-configured logger, so the logger can be globally used across the application.
Team Navigation Page Backend Binding
CreateTeam()
method of the team service to create a new team and add yourself and another user as members?CreatePrivateChat(string myUserId, string otherUserId)
{
// Create team
// Add myself and other user as members
}
ChatHubViewModel was originally designed to be a single global instance, which should be shared all across the application.
With the current UI-structure(TeamNav
/ChatNav
+ ChatPage
), where navigation and content-display are completely separated, it should be easier to have a singleton service that each UI-element can independently access.
Plan is to remove ChatHubViewModel and create a new service on the front-end side (Messenger(UWP).Services).
No changes will be made on back-end.
MessageService.CreateMessage()
TeakService.CreateTeam()
Issue #53 should precede before this issue
Messages
, Teams
) of the ChatHubViewModel
UserService
TeamService
MessageService
MessengerService
PrivateChatService
FileSharingService
Backend tasks:
Channel
classChannelService
SignalRService
MessengerService
Frontend tasks:
Help wanted on:
The add team button is not separated from the list of teams, thus it can be hidden by scrolling through the list.
Instead, it's position should be fixed and not be part of the ScrollView
.
Maybe show lines or at least the called function and arguments.
remove every placeholder and link to dynamic data from the database
Certain types like strings are initialized to null
causing exceptions, those members should be explicitly initialized to a sensible default (e.g. empty string).
Try removing the line containing$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets
from Messenger.Tests.MSTest/Messenger.Tests.MSTest.csproj
Currently, the function trims the group information out from the username. (e.g. "Jawoon Kim / PBT3H19A" => "Jawoon Kim").
The username itself, however, is not being forced to have this format and could potentially cause problem if the user logs in with a personal account(which does not have group information at the end, just the full name).
It should either check if it needs trimming or not and should be handled accordingly before saving to the database.
Depends on:
#110
Backend Tasks:
Help wanted on:
Backend Tasks:
Help wanted on:
csharp> Console.WriteLine(Convert.ToInt32(DBNull.Value));
System.InvalidCastException: Object cannot be cast from DBNull to other types.
at System.DBNull.System.IConvertible.ToInt32 (System.IFormatProvider provider) [0x00000] in <efe941bb62534dc3a62ceb1a818964a0>:0
at System.Convert.ToInt32 (System.Object value) [0x00003] in <efe941bb62534dc3a62ceb1a818964a0>:0
at <InteractiveExpressionClass>.Host (System.Object& $retval) [0x00000] in <2ebe5a723a1e431d8197b8959c2e175a>:0
at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x00038] in <926cad834166473d8b2797acb6f18eea>:0
at Mono.CSharpShell.Evaluate (System.String input) [0x00000] in <f02cdd3a74474a01ba4f3cc438222cdd>:0
In some parts of our code we have statements like the below in in functions returning a uint?
, in case of DBNull
values being returned from ExecuteScalaer()
, this throws an exception, as you can see above.
return Convert.ToUint32(scalarQuery.ExecuteScalar());
The returns should use the nullish coalescing operator (??
) to conditionally return null
or the correct value.
Edit: The nullish coalescing operator (??
) does not work, because DBNull
is not null
, it should be solvable with an explicit comparison to null
(something like if ( foo is DBNull)
) instead.
Backend Tasks:
Help wanted on:
ConnectToTeams()
BIB_VPR/Messenger/Messenger/ViewModels/ChatHubViewModel.cs
Lines 135 to 156 in 1bf7fc4
UserDataService
, specifically OnLoggedIn
BIB_VPR/Messenger/Messenger/Services/UserDataService.cs
Lines 53 to 57 in 1bf7fc4
ChatHubViewModel
should only provide user interface of the hub
SignalR Hub with a unique identifier (Server / SignalR)
ChatRoom with a unique identifier (Client / UWP)
Members (Client / UWP)
Concept:
string
?)List<string>
for the class, comma separated string
for the table?)Backend tasks:
async Task<bool> Team.AddRole(string role, uint teamId)
async Task<bool> Team.RemoveRole(string role, uint teamId)
async Task<bool> Team.AssignRole(string role, string userId, uint teamId)
async Task<bool> Team.UnassignRloe(string role, string userId, uint teamId)
async Task<List<string>> Team.ListRoles(uint teamId)
async Task<List<string>> Team.GetUsersWithRole(uint teamId, string role)
async Task<List<string>> Team.GetUsersRoles(uint teamId, string userId)
MessengerService
and SignalRService
Frontend tasks:
Help wanted on:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.